pastas.timeseries.TimeSeries.update_series#
- TimeSeries.update_series(force_update=False, **kwargs)[source]#
Method to update the series with new options.
- Parameters:
force_update (bool, optional) – argument that is used to force an update, even when no changes are found. Internally used by the __init__ method. Default is False.
freq (str, optional) – String representing the desired frequency of the time series. Must be one of the following: (D, h, m, s, ms, us, ns) or a multiple of that e.g. “7D”.
sample_up (str or float, optional) – String with the method to use when the frequency is increased (e.g., Weekly to daily). Possible values are: “backfill”, “bfill”, “pad”, “ffill”, “mean”, “interpolate”, “divide” or a float value to fill the gaps.
sample_down (str, optional) – String with the method to use when the frequency decreases (e.g., from daily to weekly values). Possible values are: “mean”, “drop”, “sum”, “min”, “max”.
fill_nan (str or float, optional) – Method to use when there ar nan-values in the time series. Possible values are: “mean”, “drop”, “interpolate” (default) or a float value.
fill_before (str or float, optional) – Method used to extend a time series before any measurements are available. possible values are: “mean” or a float value.
fill_after (str or float, optional) – Method used to extend a time series after any measurements are available. Possible values are: “mean” or a float value.
tmin (str or pandas.Timestamp, optional) – String that can be converted to, or a Pandas Timestamp with the minimum time of the series.
tmax (str or pandas.Timestamp, optional) – String that can be converted to, or a Pandas Timestamp with the maximum time of the series.
- Return type:
None
Notes
The method will validate if any of the settings is changed to determine if the series need to be updated.