reindex_like(s, method='ffill') is different than reindex_like(s).fillna(method='ffill') #34547
Labels
API - Consistency
Internal Consistency of API/Behavior
Bug
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
I don't know whether this a bug or a feature, but the behavior is not clear to me after reading the
reindex_like
docs.There is a note "Please note: this is only applicable to DataFrames/Series with a monotonically increasing/decreasing index." - but what it actually does is to fill "as if" the index after reindexing was sorted.
Sample code
I expected the same result with both methods. Should they behave differently?
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.8.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : de_DE.cp1252
pandas : 1.0.3
numpy : 1.18.4
pytz : 2020.1
dateutil : 2.8.1
pip : 20.0.2
setuptools : 45.2.0
Cython : None
pytest : 5.4.2
hypothesis : None
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
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.2
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: