-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
API DesignBugDatetimeDatetime data dtypeDatetime data dtypeError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandas
Milestone
Description
created by @prossahl
Reversing an index and forward filling succeeds but produces misleading data:
>>> dr = pd.date_range('2013-08-01', periods=6, freq='B')
>>> df = pd.DataFrame(np.random.randn(6,1), index=dr, columns=list('A'))
>>> df['A'][3] = np.nan
>>> df.reindex(df.index[::-1], method='ffill')
A
2013-08-08 2.127302
2013-08-07 NaN
2013-08-06 NaN
2013-08-05 NaN
2013-08-02 NaN
2013-08-01 NaN
This change enforces "monotocity" (well actually weakly increasing) and causes a ValueError to be raised.
Metadata
Metadata
Assignees
Labels
API DesignBugDatetimeDatetime data dtypeDatetime data dtypeError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandas