TimeSeriesDataFrame.from_path#
- classmethod TimeSeriesDataFrame.from_path(path: Union[str, Path], id_column: Optional[str] = None, timestamp_column: Optional[str] = None, static_features_path: Optional[Union[str, Path]] = None) TimeSeriesDataFrame[source]#
Construct a
TimeSeriesDataFramefrom a CSV or Parquet file.- Parameters
path (str or pathlib.Path) –
Path to a local or remote (e.g., S3) file containing the time series data in CSV or Parquet format. Example file contents:
item_id,timestamp,target 0,2019-01-01,0 0,2019-01-02,1 0,2019-01-03,2 1,2019-01-01,3 1,2019-01-02,4 1,2019-01-03,5 2,2019-01-01,6 2,2019-01-02,7 2,2019-01-03,8
id_column (str, optional) – Name of the ‘item_id’ column if column name is different
timestamp_column (str, optional) – Name of the ‘timestamp’ column if column name is different
static_features_path (str or pathlib.Path, optional) –
Path to a local or remote (e.g., S3) file containing static features in CSV or Parquet format. Example file contents:
item_id,feat_1,feat_2 0,foo,0.5 1,foo,2.2 2,bar,0.1
- Returns
ts_df – A data frame in TimeSeriesDataFrame format.
- Return type