Cannot use categorical IntervalIndex as index when creating pivot_table #25814
Labels
Categorical
Categorical Data Type
Interval
Interval data type
Regression
Functionality that used to work in a prior pandas version
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
Code Sample, a copy-pastable example if possible
Problem description
Cannot use IntervalIndex as index when creating pivot_table. It works fine on 0.23.4.
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\indexes\interval.py in _get_prev_label(label)
75 else:
76 raise TypeError('cannot determine next label for type {typ!r}'
---> 77 .format(typ=type(label)))
78
79
TypeError: cannot determine next label for type <class 'str'>
Output of
pd.show_versions()
pandas: 0.24.2
pytest: 4.0.2
pip: 18.1
setuptools: 40.6.3
Cython: 0.29.2
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.12
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: Nonetput of
pd.show_versions()
here below this line]The text was updated successfully, but these errors were encountered: