def QDS_StockMinWarpper(func, *args, **kwargs):
    """
    分钟线QDS装饰器
    """

    def warpper(*args, **kwargs):
        data = func(*args, **kwargs)
        if isinstance(data.index, pd.MultiIndex):

            return QA_DataStruct_Stock_min(data)
        else:
            return QA_DataStruct_Stock_min(
                data.assign(datetime=pd.to_datetime(data.datetime)
                           ).set_index(['datetime',
                                        'code'],
                                       drop=False),
                dtype='stock_min'
            )

    return warpper