-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Contribute to issue #15580 #28264
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
Contribute to issue #15580 #28264
Conversation
Signed-off-by: gabriel <[email protected]>
@@ -183,7 +183,7 @@ By default the group keys are sorted during the ``groupby`` operation. You may h | |||
|
|||
.. ipython:: python | |||
|
|||
df2 = pd.DataFrame({'X': ['B', 'B', 'A', 'A'], 'Y': [1, 2, 3, 4]}) | |||
df2 = pd.DataFrame({'X': ['A', 'A', 'B', 'B'], 'Y': [1, 2, 3, 4]}) |
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 think this was deliberate. We want the X
column to be unsorted so that the two operations below (sort=True/False
) are differentiations.
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.
Now reading it more carefully I can see the intention of this section. I will pay more attention when proposing small changes similar to that one, sorry.
@@ -799,7 +799,7 @@ Another common data transform is to replace missing data with the group mean. | |||
transformed = grouped.transform(lambda x: x.fillna(x.mean())) | |||
|
|||
We can verify that the group means have not changed in the transformed data | |||
and that the transformed data contains no NAs. | |||
and that the transformed data contains no NAN's. |
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.
We try to use NA to refer to missing values in generally. We'll sometimes use np.nan
when talking about that specific specific missing value.
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.
Ok, got it!
Thanks for the PR! I don't think we want to merge any of these changes though so going to close this one. We definitely appreciate contributions so if you are interested in the area I would suggest checking the issue tracker for items labeled |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
I'm new at contributing on Pandas and any project at all, and saw this generic "fix docs" issue. I made some very small changes that i think it helps users to understand better the
groupBy
usage. Please, feel free to judge my changes and request modifications. Thanks!