code: def QDS_StockDayWarpper(func):
      
  
      def warpper(*args, **kwargs):
          data = func(*args, **kwargs)
  
          if isinstance(data.index, pd.MultiIndex):
  
              return QA_DataStruct_Stock_day(data)
          else:
              return QA_DataStruct_Stock_day(
                  data.assign(date=pd.to_datetime(data.date)
                             ).set_index(['date',
                                          'code'],
                                         drop=False),
                  dtype='stock_day'
              )
  
      return warpper
docs: 日线QDS装饰器