Pandas 0.23.4 reindexing multiindexed frame with ffill
confusing output
#23225
Labels
Bug
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
MultiIndex
Needs Discussion
Requires discussion from core team before further action
Code Sample, a copy-pastable example if possible
Problem description
This issue is very similar to #5569, except in the context of a
MultiIndex
. The behavior in question appears to have changed between0.22.0
and 0.23.4`.The explanation given in #5569 makes sense for regular indexes, but I'm having trouble seeing how it applies in the context of a
MultiIndex
.Expected Output
The actual value of
failed_ffill_reindex
looks likeI'm not sure how to understand the fact that the later rows successfully take on the 0.5 value, but the earlier rows do not.
Specifically, I'm interested in the second row (at
('Foo', 'a', 1)
). I would expect this row to contain non-NaN data.Is the idea here that a multi-index can't be seen as "monotonically increasing", so I shouldn't be passing any "fill methods" into my
reindex
call? If that's the case, should we institute some sort of warning or exception?Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-36-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: C.UTF-8
LANG: C.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: None
pip: 18.0
setuptools: 40.0.0
Cython: 0.25.2
numpy: 1.15.2
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.0.1
sphinx: None
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: 2.7.5 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: