TimeSeriesDataFrame.from_iterable_dataset¶
- classmethod TimeSeriesDataFrame.from_iterable_dataset(iterable_dataset: Iterable, num_cpus: int = -1) TimeSeriesDataFrame[source]¶
- Construct a - TimeSeriesDataFramefrom an Iterable of dictionaries each of which represent a single time series.- This function also offers compatibility with GluonTS ListDataset format. - Parameters:
- iterable_dataset (Iterable) – - An iterator over dictionaries, each with a - targetfield specifying the value of the (univariate) time series, and a- startfield with the starting time as a pandas Period . Example:- iterable_dataset = [ {"target": [0, 1, 2], "start": pd.Period("01-01-2019", freq='D')}, {"target": [3, 4, 5], "start": pd.Period("01-01-2019", freq='D')}, {"target": [6, 7, 8], "start": pd.Period("01-01-2019", freq='D')} ] 
- num_cpus (int, default = -1) – Number of CPU cores used to process the iterable dataset in parallel. Set to -1 to use all cores. 
 
- Returns:
- ts_df – A data frame in TimeSeriesDataFrame format. 
- Return type: