Skip to content
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

BUG: inconsistent name for returned Series in groupby #12363

Closed
jreback opened this issue Feb 17, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@jreback
Copy link
Contributor

commented Feb 17, 2016

I would think [7] and [8] would be identical. Note this is true for all ops I have looked at, so it is a general issue.

In [6]:         df = DataFrame({'A': ['foo', 'bar', 'foo', 'bar',
                              'foo', 'bar', 'foo', 'foo'],
                        'B': ['one', 'one', 'two', 'two',
                              'two', 'two', 'one', 'two'],
                        'C': np.random.randn(8) + 1.0,
                        'D': np.arange(8)})

In [7]: df.groupby(['A']).B.count()
Out[7]: 
A
bar    3
foo    5
Name: B, dtype: int64

In [8]: df.B.groupby(df.A).count()
Out[8]: 
A
bar    3
foo    5
dtype: int64

@jreback jreback added this to the Next Major Release milestone Feb 17, 2016

@jreback

This comment has been minimized.

Copy link
Contributor Author

commented Feb 17, 2016

xref #8093

@jreback jreback modified the milestones: 0.18.1, Next Major Release Apr 12, 2016

jreback added a commit to jreback/pandas that referenced this issue Apr 21, 2016

ENH: allow .rolling / .expanding as groupby methods
closes pandas-dev#12738

BUG: allow df.groupby(...).resample(...) to return a Resampler groupby object

closes pandas-dev#12486

BUG: consistency of name of returned groupby

closes pandas-dev#12363

@jreback jreback closed this in 6994240 Apr 26, 2016

nps added a commit to nps/pandas that referenced this issue May 17, 2016

ENH: allow .rolling / .expanding as groupby methods
closes pandas-dev#12738
closes pandas-dev#12486
closes pandas-dev#12363

Author: Jeff Reback <jeff@reback.net>

Closes pandas-dev#12743 from jreback/expand and squashes the following commits:

f98e6f8 [Jeff Reback] ENH: allow .rolling / .expanding as groupby methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.