-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: added examples to align function's documentation #42129
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
Conversation
meiruv
commented
Jun 19, 2021
•
edited by simonjayhawkins
Loading
edited by simonjayhawkins
- closes DOC add example to align #42125
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
Hello @meiruv! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-07-13 11:54:34 UTC |
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.
This is off to a good start!
Some pre-commit checks are failing though, see here for how to run them
@@ -8514,10 +8514,31 @@ def align( | |||
------- | |||
(left, right) : ({klass}, type of other) | |||
Aligned objects. | |||
""" | |||
|
|||
method = missing.clean_fill_method(method) |
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.
this shouldn't be removed
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.
I addressed this in the last commit
Hey @meiruv - are you still working on this? No hurry, just checking if it's still active / if you need help with anything |
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 updating!
The example looks good, there's just a pre-commit failure, see here, can you fix it up please?
>>> df2 = pd.DataFrame([[10,20,30,40], [60,70,80,90], [600,700,800,900]], | ||
columns=['A', 'B', 'C', 'D'], index=[2,3,4]) | ||
|
||
>>> a1, a2 = df1.align(df2, join='outer', axis=1) |
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.
perhaps call these left, right
?
3 60 70 80 90 NaN | ||
4 600 700 800 900 NaN | ||
|
||
>>> a1, a2 = df1.align(df2, join='inner', axis=None) |
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.
likewise
>>> df1 = pd.DataFrame([[1,2,3,4], [6,7,8,9]], | ||
columns=['D', 'B', 'E', 'A'], index=[1,2]) |
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.
also, the formatting's a bit strange here, it would be better to either format your example with black
, or to align the arguments, like
>>> df1 = pd.DataFrame([[1,2,3,4], [6,7,8,9]], | |
columns=['D', 'B', 'E', 'A'], index=[1,2]) | |
>>> df1 = pd.DataFrame( | |
... [[1,2,3,4], [6,7,8,9]], | |
... columns=['D', 'B', 'E', 'A'], | |
... index=[1, 2] | |
... ) |
(same for the other parts of the example)
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
Hi @meiruv - still working on this? Looks like it's pretty close - no hurry if you are, would just be good to know |
closing as per #42125 (comment) |