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
import pandas as pd series = pd.Series(1., pd.period_range('2015', '2016', freq='B')) resampled = series.resample('3B').sum() print type(series.index) print type(resampled.index)
A PeriodIndex when resampled by a multiple of BusinessDays becomes a DatetimeIndex.
PeriodIndex
DatetimeIndex
I would expect it to be a 3B PeriodIndex
pd.show_versions()
commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 4.4.0-36-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None
pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.24 numpy: 1.12.0 scipy: 0.18.1 statsmodels: 0.6.1 xarray: 0.8.2 IPython: 4.1.1 sphinx: None patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: None numexpr: 2.5 matplotlib: 1.5.1 openpyxl: 2.3.3 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: None lxml: 3.5.0 bs4: 4.5.1 html5lib: None httplib2: 0.9.2 apiclient: None sqlalchemy: 1.0.12 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.45.0 pandas_datareader: None
The text was updated successfully, but these errors were encountered:
Thanks for the report - this is the same issue as #12884, xref #12871 for the master tracker on Period re-sampling. PRs welcome!
Period
Sorry, something went wrong.
No branches or pull requests
Code Sample, a copy-pastable example if possible
Problem description
A
PeriodIndex
when resampled by a multiple of BusinessDays becomes aDatetimeIndex
.Expected Output
I would expect it to be a 3B
PeriodIndex
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-36-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.24
numpy: 1.12.0
scipy: 0.18.1
statsmodels: 0.6.1
xarray: 0.8.2
IPython: 4.1.1
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: None
numexpr: 2.5
matplotlib: 1.5.1
openpyxl: 2.3.3
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: None
lxml: 3.5.0
bs4: 4.5.1
html5lib: None
httplib2: 0.9.2
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.45.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: