gs_quant.timeseries.algebra.repeat¶
-
repeat
(x, n=1)[source]¶ Repeats values for days where data is missing. For any date with missing data, the last recorded value is used. Optionally downsamples the result such that there are data points every n days.
- Parameters
x (
Series
) – date-based timeseriesn (
int
) – desired frequency of output
- Return type
Series
- Returns
a timeseries that has been forward-filled, and optionally downsampled
Usage
Fill missing values with last seen value e.g. to combine daily with weekly or monthly data.