Skip to content

Documentation: Example missing in NA values by GroupBy #10414

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

Closed
harshnisar opened this issue Jun 23, 2015 · 4 comments · Fixed by #10450
Closed

Documentation: Example missing in NA values by GroupBy #10414

harshnisar opened this issue Jun 23, 2015 · 4 comments · Fixed by #10450
Labels
Milestone

Comments

@harshnisar
Copy link
Contributor

http://pandas.pydata.org/pandas-docs/stable/missing_data.html#na-values-in-groupby

NA groups in GroupBy are automatically excluded. This behavior is consistent with R, for example.

I can take this up.

@jorisvandenbossche
Copy link
Member

That would be welcome!

@jorisvandenbossche jorisvandenbossche added this to the 0.17.0 milestone Jun 23, 2015
@harshnisar
Copy link
Contributor Author

@jorisvandenbossche
This looks fine?

In [30]: df
Out[30]: 
        one       two     three
a       NaN -0.282863 -1.509059
c       NaN  1.212112 -0.173215
e  0.119209 -1.044236 -0.861849
f -2.104569 -0.494929  1.071804
h       NaN -0.706771 -1.039575

In [31]: df.groupby('one').groups
Out[31]: {-2.1045692188948086: ['f'], 0.11920871129693428: ['e']}

@jorisvandenbossche
Copy link
Member

Yes, that looks good.
But maybe show the a result (like df.groupby('one').mean()) instead of the .groups?

@harshnisar
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants