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
In [15]: s = Series(np.arange(8),index=pd.MultiIndex.from_product([list('ab'),range(2),pd.date_range('20130101',periods=2)],names=['one','two','three']))
In [16]: s
Out[16]:
one two three
a 0 2013-01-01 0
2013-01-02 1
1 2013-01-01 2
2013-01-02 3
b 0 2013-01-01 4
2013-01-02 5
1 2013-01-01 6
2013-01-02 7
dtype: int64
# datetimelikes work
In [17]: s.groupby(pd.Grouper(level='three',freq='M')).sum()
Out[17]:
three
2013-01-31 28
Freq: M, dtype: int64
# just specifying a level breaks
In [18]: s.groupby(pd.Grouper(level='one')).sum()
ValueError: No axis named None for object type <class 'pandas.core.series.Series'>
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: