You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if I use count for aggregation, the name is not set:
df_grp.count()
col1a2b1c1dtype: int64
Not a big problem for a simple case like that, but I stumbled over that while working with a MultiIndex that needed to be reindexed and led to a KeyError due to that missing column name.
The text was updated successfully, but these errors were encountered:
@jreback - Apologies for the delayed response, I have been out of the country for a few weeks. This does not appear to be a duplicate of #6124 and I verified that #6068 does not fix the problem
The problem described in this issue can be traced to SeriesGroupBy._wrap_applied_output where it just returns an (unnamed) series.
Consider this very basic group by operation:
When aggregating using
mean
,min
, ... (everything butcount
) the resulting Series hascol2
as its name:However, if I use
count
for aggregation, the name is not set:Not a big problem for a simple case like that, but I stumbled over that while working with a MultiIndex that needed to be reindexed and led to a
KeyError
due to that missing column name.The text was updated successfully, but these errors were encountered: