We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
so it appears that [9] is wrong, should be consistent with [7],[8]
In [1]: index = date_range('20130101',freq='2D',periods=6) In [2]: df = DataFrame(np.arange(20).reshape(5,4),columns=list('ABCD'),index=index.take([0,1,2,3,4])) In [3]: df.resample('2D',how='max') Out[3]: A B C D 2013-01-01 0 1 2 3 2013-01-03 4 5 6 7 2013-01-05 8 9 10 11 2013-01-07 12 13 14 15 2013-01-09 16 17 18 19 In [4]: df.groupby(pd.Grouper(level=0,freq='2D')).max() Out[4]: A B C D 2013-01-01 0 1 2 3 2013-01-03 4 5 6 7 2013-01-05 8 9 10 11 2013-01-07 12 13 14 15 2013-01-09 16 17 18 19 In [5]: df.groupby([pd.Grouper(level=0,freq='2D')]).max() Out[5]: A B C D 2013-01-01 0 1 2 3 2013-01-03 4 5 6 7 2013-01-05 8 9 10 11 2013-01-07 12 13 14 15 2013-01-09 16 17 18 19 In [6]: In [6]: df = DataFrame(np.arange(20).reshape(5,4),columns=list('ABCD'),index=index.take([0,1,2,4,5])) In [7]: df.resample('2D') Out[7]: A B C D 2013-01-01 0 1 2 3 2013-01-03 4 5 6 7 2013-01-05 8 9 10 11 2013-01-07 NaN NaN NaN NaN 2013-01-09 12 13 14 15 2013-01-11 16 17 18 19 In [8]: df.groupby(pd.Grouper(level=0,freq='2D')).max() Out[8]: A B C D 2013-01-01 0 1 2 3 2013-01-03 4 5 6 7 2013-01-05 8 9 10 11 2013-01-07 NaN NaN NaN NaN 2013-01-09 12 13 14 15 2013-01-11 16 17 18 19 In [9]: df.groupby([pd.Grouper(level=0,freq='2D')]).max() Out[9]: A B C D 2013-01-01 0 1 2 3 2013-01-03 4 5 6 7 2013-01-05 8 9 10 11 2013-01-09 12 13 14 15 2013-01-11 16 17 18 19
The text was updated successfully, but these errors were encountered:
this is a duplicate of #17530 and closed by #17587
Sorry, something went wrong.
No branches or pull requests
so it appears that [9] is wrong, should be consistent with [7],[8]
The text was updated successfully, but these errors were encountered: