From 6e95d144f8b45b26fbbd38f126e5eb079bbe538a Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Wed, 20 Dec 2023 21:50:03 +0800 Subject: [PATCH] fix: replace removesuffix() with split(), the former is not available <= Python 3.7; --- tsdb/loading_funcs/electricity_transformer_temperature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/loading_funcs/electricity_transformer_temperature.py b/tsdb/loading_funcs/electricity_transformer_temperature.py index 39d1bff..c7b3052 100644 --- a/tsdb/loading_funcs/electricity_transformer_temperature.py +++ b/tsdb/loading_funcs/electricity_transformer_temperature.py @@ -48,7 +48,7 @@ def load_ett(local_path): file_path = os.path.join(local_path, sub_set) df = pd.read_csv(file_path, index_col="date") df.index = pd.to_datetime(df.index) - df_name = sub_set.removesuffix(".csv") + df_name = sub_set.split(".csv")[0] data[df_name] = df return data