Skip to content

Commit

Permalink
ENH pandas-dev#3715: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nchmura4 committed Nov 29, 2016
1 parent 9d226f8 commit 17eb233
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3990,6 +3990,10 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
Optionally provide filling method to pad/backfill missing values.
Returns the original data conformed to a new index with the specified
frequency. ``resample`` is more appropriate if an operation, such as
summarization, is necessary to represent the data at the new frequency.
Parameters
----------
freq : DateOffset object, or string
Expand All @@ -4005,7 +4009,8 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
normalize : bool, default False
Whether to reset output index to midnight
fill_value: scalar, optional
value to use for missing values, applied during upsampling
Value to use for missing values, applied during upsampling (note
this does not fill NaNs that already were present).
.. version added:: 0.20.0
Expand Down Expand Up @@ -4052,6 +4057,18 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
2000-01-01 00:02:30 9.0
2000-01-01 00:03:00 3.0
Upsample again, providing a ``method``.
>>> df.asfreq(freq='30S', method='bfill')
s
2000-01-01 00:00:00 0.0
2000-01-01 00:00:30 NaN
2000-01-01 00:01:00 NaN
2000-01-01 00:01:30 2.0
2000-01-01 00:02:00 2.0
2000-01-01 00:02:30 3.0
2000-01-01 00:03:00 3.0
Notes
-----
To learn more about the frequency strings, please see `this link
Expand Down

0 comments on commit 17eb233

Please sign in to comment.