DataFrame.ix drops level of MultiIndex #16143
Labels
Duplicate Report
Duplicate issue or pull request
Indexing
Related to indexing on series/frames, not to indexes themselves
MultiIndex
Code Sample, a copy-pastable example if possible
Output
Problem description
My understanding is that
DataFrame.ix
is a read-only operation and should not modify theDataFrame
. However, in the example above columnA
is dropped from the index and thus cannot be use anymore.Expected Output
The unmodified
DataFrame
. So the last print yields the same output as the first one.Output of
pd.show_versions()
pandas: 0.19.2
nose: None
pip: 9.0.1
setuptools: 35.0.0
Cython: None
numpy: 1.12.1
scipy: 0.19.0
statsmodels: None
xarray: None
IPython: 5.3.0
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.1.9
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: