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
Upsampling returns a Series, Downsampling returns a DataFrame. Is this valid?
In [80]: series=pd.Series(range(10), index=pd.PeriodIndex(start='2000', freq='D', periods=10)) In [81]: series Out[81]: 2000-01-01 0 2000-01-02 1 2000-01-03 2 2000-01-04 3 2000-01-05 4 2000-01-06 5 2000-01-07 6 2000-01-08 7 2000-01-09 8 2000-01-10 9 Freq: D, dtype: int64 In [83]: series.resample('M').ohlc() Out[83]: open high low close 2000-01 0 9 0 9 # returns a DataFrame In [84]: series.resample('H').ohlc() Out[84]: 2000-01-01 00:00 0.0 ... 2000-01-10 23:00 NaN Freq: H, dtype: float64 # returns a series
on master
The text was updated successfully, but these errors were encountered:
so this is just true for PeriodIndex. DTI works.
PeriodIndex
Though upsampling is a bit odd for ohlc (as all of the values are the same). So I would match DTI.
Sorry, something went wrong.
BUG: Fix some PeriodIndex resampling issues (#16153)
7d4a260
closes #15944 xref #12884 closes #13083 closes #13224
BUG: Fix some PeriodIndex resampling issues (pandas-dev#16153)
4c3ca19
closes pandas-dev#15944 xref pandas-dev#12884 closes pandas-dev#13083 closes pandas-dev#13224
e76612f
Successfully merging a pull request may close this issue.
Upsampling returns a Series, Downsampling returns a DataFrame. Is this valid?
on master
The text was updated successfully, but these errors were encountered: