-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: Assignment to MultiIndex fails for pandas 1.0.0. #31449
New issue
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
Comments
@tobiasraabe Thanks for the report! I can confirm this is a regression also compared to 0.25 |
cc @jbrockmendel might be related to #27883 (PR that touched the related function in the traceback) |
Glad I did not waste your time :). I use |
on indexing.py L896 we shouldn't be calling |
Yep, indeed, it's what |
* REGR: Fixed setitem with MultiIndex Closes #31449 * 32-bit compat
Code Sample, a copy-pastable example if possible
This problem occurred with
pandas 1.0.0 py37he350917_0 conda-forge
, but did not before or at least not since 0.24.Problem description
The error message is the following
If the MultiIndex would have been sorted,
key
in the last part of the traceback orindexer
in the first part would have been a slice and everything is fine. Since the MultiIndex is unsortedkey
orindexer
are a boolean array which has no start stop attributes.I am sorry for not digging further, but I have not inspected pandas internals before.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.0
numpy : 1.17.5
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 45.1.0.post20200119
Cython : None
pytest : 5.3.5
hypothesis : None
sphinx : 2.3.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.11.1
pandas_datareader: None
bs4 : 4.8.2
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.1.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : None
scipy : 1.3.1
sqlalchemy : 1.3.13
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : 0.46.0
The text was updated successfully, but these errors were encountered: