You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #10691 had a bug in computing the NaN mask in certain cases.
Specifically, when a NaN occurs within limit of the beginning of the series and limit_direction is set to 'both', the interpolation code will erroneously interpolate these NaNs rather than masking them off.
From the PR:
In [43]: ser = pd.Series([np.nan, np.nan, 5, np.nan, np.nan, np.nan, 13])
In [44]: ser.interpolate(limit=1, limit_direction='both')
Out[44]:
0 5
1 5
2 5
3 7
4 NaN
5 11
6 13
dtype: float64
This should actually give:
Out[44]:
0 NaN
1 5
2 5
3 7
4 NaN
5 11
6 13
dtype: float64