Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
DataFrame.groupby.count sometimes returns Series instead of DataFrame #3596
Comments
|
#2893 changed this maybe we should add a keyword to make this optional instead of sometimes changing the arity |
|
@wesm ? |
jreback
referenced
this issue
May 14, 2013
Merged
BUG: Add squeeze keyword to groupby to allow reduction in returned type #3599
|
closeed by #3599 |
jreback
closed this
May 15, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
elliottwaldron commentedMay 13, 2013
In version 0.11.0
returns a DataFrame, when there are 2+ grouping levels...
but,
returns a Series, when there is only 1 grouping level.
In version 0.10.0, B would also be a DataFrame.
Don't know if this was by design, but it seems awkward to check the type before using B downstream.