Series.at and DataFrame.at crash with CategoricalIndex #20629
Labels
Bug
Categorical
Categorical Data Type
Indexing
Related to indexing on series/frames, not to indexes themselves
Milestone
Code Sample, a copy-pastable example if possible
Problem description
With a
CategoricalIndex
,Series.at
raisesAttributeError
andDataFrame.at
raisesTypeError
andKeyError
.Expected Output
x.at["A"]
should work the same asx.loc["A"]
, andx.at["B", 1]
should work the same asx.loc["B", 1]
.Output of
pd.show_versions()
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.13.0-37-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0
pytest: 3.4.0
pip: 9.0.3
setuptools: 39.0.1
Cython: None
numpy: 1.14.2
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: None
sphinx: 1.6.7
patsy: 0.4.1
dateutil: 2.7.2
pytz: 2018.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: 2.4.9
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml: 4.0.0
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.0
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: