BUG: NotImplementedError: Prefix not defined when slicing offset with loc #46671
Closed
2 of 3 tasks
Labels
Bug
Datetime
Datetime data dtype
Indexing
Related to indexing on series/frames, not to indexes themselves
Regression
Functionality that used to work in a prior pandas version
Milestone
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
As it seems, starting from version 1.4 onward, if the date index is of type
offset
then when trying to runloc
operations raisesNotImplementedError: Prefix not defined
.Searching on the web if people had a similar issue but couldn't find much, closest thing seems to be issue #26921.
Expected Behavior
Slicing the date index on specified date points in
loc
.Installed Versions
INSTALLED VERSIONS
commit : bb1f651
python : 3.9.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.13.0-39-generic
Version : #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0
numpy : 1.22.3
pytz : 2022.1
dateutil : 2.8.2
pip : 20.0.2
setuptools : 44.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.1
IPython : 8.2.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.5.1
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: