TimeFrame.infill#
- TimeFrame.infill(infill_method, column_name, max_gap_size=None, observation_interval=None, flag_params=None, **kwargs)[source]#
Apply an infilling method to a column in the TimeFrame to fill in missing data.
- Parameters:
infill_method (
Union[str,Type[InfillMethod],InfillMethod]) – The method to use for infillingcolumn_name (
str) – The column to infillmax_gap_size (
int|None) – The maximum size of consecutive null gaps that should be filled. Any gap larger than this will not be infilled and will remain as null.observation_interval (
tuple[datetime,datetime|None] |None) – Optional time interval to limit the check to. Datetimes must match the time column: without a time zone if it has none, or in UTC if it is in UTC.flag_params (
tuple[str,str|int] |None) – Tuple of (flag column name [str], flag value [str | int]. If provided, add given flag value to the flag column on rows that were infilled. If not provided, no flags added.**kwargs – Parameters specific to the infill method.
- Return type:
- Returns:
A TimeFrame containing the infilled data. Missing time steps are padded in, so the result can contain more rows than this TimeFrame. Values added by padding are null in all other columns.