load_from_tsfile_to_dataframe#

load_from_tsfile_to_dataframe(full_file_path_and_name, return_separate_X_and_y=True, replace_missing_vals_with='NaN', encoding='utf-8', y_dtype='str')[source]#

将数据从 .ts 文件加载到 Pandas DataFrame 中。

参数:
full_file_path_and_name: str

要读取的 .ts 文件的完整路径名。

return_separate_X_and_y: bool

如果 X 和 Y 值应作为单独的 Data Frames ( X) 和 numpy 数组 (y) 返回,则为 true,否则为 false。这仅与以下数据相关

replace_missing_vals_with: str

文本文件中缺失值在解析前应替换为的值。

encoding: str

encoding 是用于使用 open 函数读取文件的编码名称。

返回:
DataFrame (默认) 或 ndarray (i

如果 return_separate_X_and_y 为 True,则返回一个元组,其中包含一个 DataFrame 和一个 numpy 数组,分别包含相关的时间序列和相应的类别值。

DataFrame

如果 not return_separate_X_and_y 为 True,则返回一个单独的 DataFrame,其中包含所有时间序列以及(如果相关)一个名为“class_vals”的列,其中包含相关的类别值。