code: def from_tushare(dataframe, dtype='day'):
      
  
      if dtype in ['day']:
          return QA_DataStruct_Stock_day(
              dataframe.assign(date=pd.to_datetime(dataframe.date)
                              ).set_index(['date',
                                           'code'],
                                          drop=False),
              dtype='stock_day'
          )
      elif dtype in ['min']:
          return QA_DataStruct_Stock_min(
              dataframe.assign(datetime=pd.to_datetime(dataframe.datetime)
                              ).set_index(['datetime',
                                           'code'],
                                          drop=False),
              dtype='stock_min'
          )
docs: dataframe from tushare
  
      Arguments:
          dataframe {[type]} -- [description]
  
      Returns:
          [type] -- [description]