def QDS_StockDayWarpper(func):
    """
    日线QDS装饰器
    """

    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
日线QDS装饰器