From 0c1d817468a96e76d1671bfa5476278c03cb364b Mon Sep 17 00:00:00 2001 From: S <75491816+TechnoShip123@users.noreply.github.com> Date: Mon, 4 Mar 2024 07:16:12 -0600 Subject: [PATCH 1/3] Remove references to `bfill`, `ffill`, `pad`, `backfill` from `limit_direction` --- pandas/core/resample.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 4a5feb92c02f9..7ba88e9083449 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -819,20 +819,6 @@ def interpolate( limit_direction : {{'forward', 'backward', 'both'}}, Optional Consecutive NaNs will be filled in this direction. - If limit is specified: - * If 'method' is 'pad' or 'ffill', 'limit_direction' must be 'forward'. - * If 'method' is 'backfill' or 'bfill', 'limit_direction' must be - 'backwards'. - - If 'limit' is not specified: - * If 'method' is 'backfill' or 'bfill', the default is 'backward' - * else the default is 'forward' - - raises ValueError if `limit_direction` is 'forward' or 'both' and - method is 'backfill' or 'bfill'. - raises ValueError if `limit_direction` is 'backward' or 'both' and - method is 'pad' or 'ffill'. - limit_area : {{`None`, 'inside', 'outside'}}, default None If limit is specified, consecutive NaNs will be filled with this restriction. From 8678386be5e003652af8e72544b929ba311ebaf1 Mon Sep 17 00:00:00 2001 From: TechnoShip123 <75491816+TechnoShip123@users.noreply.github.com> Date: Mon, 4 Mar 2024 07:20:20 -0600 Subject: [PATCH 2/3] Add `bfill` and `ffill` to the "See Also" section --- pandas/core/resample.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 7ba88e9083449..6d150e20622c4 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -846,6 +846,8 @@ def interpolate( core.resample.Resampler.asfreq: Return the values at the new freq, essentially a reindex. DataFrame.interpolate: Fill NaN values using an interpolation method. + bfill : Backward fill NaN values in the resampled data. + ffill : Forward fill NaN values. Notes ----- From 7dfd36312107acd86f21b84aef0943fd1b2981d4 Mon Sep 17 00:00:00 2001 From: S <75491816+TechnoShip123@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:42:38 -0600 Subject: [PATCH 3/3] Add `bfill` and `ffill` to the "See Also" section Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --- pandas/core/resample.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 6d150e20622c4..4c87af9ff14c7 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -846,8 +846,8 @@ def interpolate( core.resample.Resampler.asfreq: Return the values at the new freq, essentially a reindex. DataFrame.interpolate: Fill NaN values using an interpolation method. - bfill : Backward fill NaN values in the resampled data. - ffill : Forward fill NaN values. + DataFrame.bfill : Backward fill NaN values in the resampled data. + DataFrame.ffill : Forward fill NaN values. Notes -----