From 5ad01071ced028a3b349cd0d333a5ccc214568e2 Mon Sep 17 00:00:00 2001 From: xumanda <10399217+xumanda@users.noreply.github.com> Date: Thu, 5 Sep 2024 20:16:27 +0800 Subject: [PATCH 1/2] Update tushare.py update concat method instead of append --- meta/data_processors/tushare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/data_processors/tushare.py b/meta/data_processors/tushare.py index d9edba83..12193c9b 100644 --- a/meta/data_processors/tushare.py +++ b/meta/data_processors/tushare.py @@ -75,7 +75,7 @@ def download_data( # nonstandard_id = self.transfer_standard_ticker_to_nonstandard(i) # df_temp = self.get_data(nonstandard_id) df_temp = self.get_data(i) - self.dataframe = self.dataframe.append(df_temp) + self.dataframe = pd.concat([self.dataframe, df_temp], ignore_index=True) #20240905 updated self.dataframe = self.dataframe.append(df_temp) # print("{} ok".format(i)) time.sleep(0.25) From 61d941107e74c6d65e7670292b625a81602cfd08 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 08:53:47 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- meta/data_processors/tushare.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/data_processors/tushare.py b/meta/data_processors/tushare.py index 12193c9b..ea6b61c2 100644 --- a/meta/data_processors/tushare.py +++ b/meta/data_processors/tushare.py @@ -75,7 +75,9 @@ def download_data( # nonstandard_id = self.transfer_standard_ticker_to_nonstandard(i) # df_temp = self.get_data(nonstandard_id) df_temp = self.get_data(i) - self.dataframe = pd.concat([self.dataframe, df_temp], ignore_index=True) #20240905 updated self.dataframe = self.dataframe.append(df_temp) + self.dataframe = pd.concat( + [self.dataframe, df_temp], ignore_index=True + ) # 20240905 updated self.dataframe = self.dataframe.append(df_temp) # print("{} ok".format(i)) time.sleep(0.25)