Skip to content

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

Conversation

GabrielValeRios
Copy link

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!

@@ -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]})
Copy link
Contributor

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.

Copy link
Author

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.
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, got it!

@WillAyd
Copy link
Member

WillAyd commented Sep 5, 2019

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 good first issue and/or docs - those are a great place to start contributing

@WillAyd WillAyd closed this Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: overall improvement of docstrings
3 participants