write_dataframe_to_tsfile#
- write_dataframe_to_tsfile(data, path, problem_name='sample_data', class_label=None, class_value_list=None, equal_length=False, series_length=-1, missing_values='NaN', comment=None, fold='')[source]#
Output a dataset in dataframe format to .ts file.
- Parameters:
- data: pandas dataframe
The dataset in a dataframe to be written as a ts file which must be of the structure specified in the documentation examples/loading_data.ipynb. index | dim_0 | dim_1 | … | dim_c-1
0 | pd.Series | pd.Series | pd.Series | pd.Series 1 | pd.Series | pd.Series | pd.Series | pd.Series
- … | … | … | … | …
n | pd.Series | pd.Series | pd.Series | pd.Series
- path: str
The full path to output the ts file to.
- problem_name: str, default=”sample_data”
The problemName to print in the header of the ts file and also the name of the file.
- class_label: list of str or None, default=None
The problems class labels to show the possible class values for in the file header, optional.
- class_value_list: list, ndarray or None, default=None
The class values for each case, optional.
- equal_length: bool, default=False
Indicates whether each series is of equal length.
- series_length: int, default=-1
Indicates the series length if they are of equal length.
- missing_values: str, default=”NaN”
Representation for missing values.
- comment: str or None, default=None
Comment text to be inserted before the header in a block.
- fold: str or None, default=None
Addon at the end of the filename, i.e. _TRAIN or _TEST.
- Returns:
- None
Notes
This version currently does not support writing timestamp data.