BUG: get_indexer_for() does not always return list of indeces #44084
Labels
Bug
Indexing
Related to indexing on series/frames, not to indexes themselves
Interval
Interval data type
MultiIndex
Milestone
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 master branch of pandas.
Reproducible Example
Issue Description
get_indexer_for()
does not return a list of indeces as described in the docs but a mask like list under some circumstances.As far as I have investigated, the behavior occurs if all of the following conditions are met:
MultiIndex
IntervalIndex
MultiIndex
The script above outputs
Expected Behavior
Expected output
Installed Versions
INSTALLED VERSIONS
commit : 3a6d4cd
python : 3.9.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-88-lowlatency
Version : #99-Ubuntu SMP PREEMPT Thu Sep 23 18:30:52 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 1.4.0.dev0+933.g3a6d4cd01d
numpy : 1.21.2
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : None
pytest : 6.2.5
hypothesis : 6.23.3
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: