Skip to content

Commit 8dbc0f4

Browse files
DOC: asfreq clarify original NaNs are not filled (GH9963) (#13617)
1 parent 65849d3 commit 8dbc0f4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

pandas/core/generic.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -3916,16 +3916,20 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
39163916

39173917
def asfreq(self, freq, method=None, how=None, normalize=False):
39183918
"""
3919-
Convert all TimeSeries inside to specified frequency using DateOffset
3920-
objects. Optionally provide fill method to pad/backfill missing values.
3919+
Convert TimeSeries to specified frequency.
3920+
3921+
Optionally provide filling method to pad/backfill missing values.
39213922
39223923
Parameters
39233924
----------
39243925
freq : DateOffset object, or string
3925-
method : {'backfill', 'bfill', 'pad', 'ffill', None}
3926-
Method to use for filling holes in reindexed Series
3927-
pad / ffill: propagate last valid observation forward to next valid
3928-
backfill / bfill: use NEXT valid observation to fill method
3926+
method : {'backfill'/'bfill', 'pad'/'ffill'}, default None
3927+
Method to use for filling holes in reindexed Series (note this
3928+
does not fill NaNs that already were present):
3929+
3930+
* 'pad' / 'ffill': propagate last valid observation forward to next
3931+
valid
3932+
* 'backfill' / 'bfill': use NEXT valid observation to fill
39293933
how : {'start', 'end'}, default end
39303934
For PeriodIndex only, see PeriodIndex.asfreq
39313935
normalize : bool, default False

0 commit comments

Comments
 (0)