import tushare as ts
import os
import pandas as pd

class DataBase:
    def get_share_history_data(self,code):
        if not self.has_share_history_local_data(code):
            self.update_share_history_data(code)
        return pd.read_csv(code+'.csv')
 
    def has_share_history_local_data(self,code):
        return os.path.exists(code+'.csv')

    def update_share_history_data(self,code):
        self._log("update data from internet")
        data = ts.get_hist_data(code)
        data.to_csv(code+".csv")

    def _log(self,str):
        print("DataBase:"+str)

    def __init__(self):
        self._log("---init---")

if __name__ == "__main__":
    dataBase = DataBase()
    data = dataBase.get_share_history_data('600845')
    print(data)

@@ -61,16 +61,420 @@
 taBase:%0A
+    def update_share_list(self):%0A        self._log(%22updata share list form internet%22)%0A        data = ts.get_stock_basics()%0A        data.to_csv(%22share_list.csv%22)%0A%0A    def has_share_list_local(self);%0A        return os.path.exists(%22share_list.csv%22)%0A%0A    def get_share_list(self):%0A        if not self.has_share_list_local():%0A            self.update_share_list()%0A        return pd.read_csv(%22share_list.csv%22)%0A%0A
     def 
@@ -1113,29 +1113,13 @@
 are_
-history_data('600845'
+list(
 )%0A  

add getdata function