-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: Added note for corr
#53972
DOC: Added note for corr
#53972
Conversation
rsm-23
commented
Jul 2, 2023
•
edited by MarcoGorelli
Loading
edited by MarcoGorelli
- closes DOC: better explain the automatic alignment process #49939
- All code checks passed.
- Added type annotations to new arguments/methods/functions.
@MarcoGorelli please review this when possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR
sorry, I didn't explain the issue very clearly
the original issue was about Series.corr
, so let's add an example there instead
How about an example in which we show:
>>> s1 = pd.Series([1, 2, 3], index=[0, 1, 2])
>>> s2 = pd.Series([1, 2, 3], index=[2, 1, 0])
and note that s1.corr(s2)
gives -1.0
because pandas aligns the indexes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonderful, thanks @rsm-23 !
let's close the issue with this one, if other places come up where results are unexpected we can document more clearly there too, otherwise the issue will stay open forever
/preview |
Website preview of this PR available at: https://pandas.pydata.org/preview/53972/ |
just waiting for the preview to load, then I'll check that the rendered docs look alright, then hopefully we can merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes look good, but it's failing the doc build
/home/runner/work/pandas/pandas/pandas/core/groupby/generic.py:docstring of pandas.core.groupby.generic.SeriesGroupBy.corr:33: ERROR: Content block expected for the "note" directive; none found.
/home/runner/work/pandas/pandas/pandas/core/groupby/generic.py:docstring of pandas.core.groupby.generic.SeriesGroupBy.corr:34: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/runner/work/pandas/pandas/pandas/core/series.py:docstring of pandas.core.series.Series.corr:33: ERROR: Content block expected for the "note" directive; none found.
/home/runner/work/pandas/pandas/pandas/core/series.py:docstring of pandas.core.series.Series.corr:34: WARNING: Explicit markup ends without a blank line; unexpected unindent.
could you build this page locally please and make sure it passes? then it should be good
cd doc
python make.py --single pandas.Series.corr
Sure @MarcoGorelli |
I tried building this page using |
don't know, can you check the contributing guide for documentation please? |
@MarcoGorelli can you please check the docs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @rsm-23 !
* Added note for corr * Removed additional linebreak * Added example and note for Series.corr * Update frame.py * Added operation in example * Fixed indentation error for note * Relocated notes
* Added note for corr * Removed additional linebreak * Added example and note for Series.corr * Update frame.py * Added operation in example * Fixed indentation error for note * Relocated notes