@@ -3990,6 +3990,10 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
3990
3990
3991
3991
Optionally provide filling method to pad/backfill missing values.
3992
3992
3993
+ Returns the original data conformed to a new index with the specified
3994
+ frequency. ``resample`` is more appropriate if an operation, such as
3995
+ summarization, is necessary to represent the data at the new frequency.
3996
+
3993
3997
Parameters
3994
3998
----------
3995
3999
freq : DateOffset object, or string
@@ -4005,7 +4009,8 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
4005
4009
normalize : bool, default False
4006
4010
Whether to reset output index to midnight
4007
4011
fill_value: scalar, optional
4008
- value to use for missing values, applied during upsampling
4012
+ Value to use for missing values, applied during upsampling (note
4013
+ this does not fill NaNs that already were present).
4009
4014
4010
4015
.. version added:: 0.20.0
4011
4016
@@ -4052,6 +4057,18 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
4052
4057
2000-01-01 00:02:30 9.0
4053
4058
2000-01-01 00:03:00 3.0
4054
4059
4060
+ Upsample again, providing a ``method``.
4061
+
4062
+ >>> df.asfreq(freq='30S', method='bfill')
4063
+ s
4064
+ 2000-01-01 00:00:00 0.0
4065
+ 2000-01-01 00:00:30 NaN
4066
+ 2000-01-01 00:01:00 NaN
4067
+ 2000-01-01 00:01:30 2.0
4068
+ 2000-01-01 00:02:00 2.0
4069
+ 2000-01-01 00:02:30 3.0
4070
+ 2000-01-01 00:03:00 3.0
4071
+
4055
4072
Notes
4056
4073
-----
4057
4074
To learn more about the frequency strings, please see `this link
0 commit comments