一个任意格式转化为DataStruct的方法
    
    Arguments:
        data {[type]} -- [description]
    
    Keyword Arguments:
        frequence {[type]} -- [description] (default: {FREQUENCE.DAY})
        market_type {[type]} -- [description] (default: {MARKET_TYPE.STOCK_CN})
        default_header {list} -- [description] (default: {[]})
    
    Returns:
        [type] -- [description]

def datastruct_formater(
        data,
        frequence=FREQUENCE.DAY,
        market_type=MARKET_TYPE.STOCK_CN,
        default_header=[]
):
    """一个任意格式转化为DataStruct的方法
    
    Arguments:
        data {[type]} -- [description]
    
    Keyword Arguments:
        frequence {[type]} -- [description] (default: {FREQUENCE.DAY})
        market_type {[type]} -- [description] (default: {MARKET_TYPE.STOCK_CN})
        default_header {list} -- [description] (default: {[]})
    
    Returns:
        [type] -- [description]
    """

    if isinstance(data, list):
        try:
            res = pd.DataFrame(data, columns=default_header)
            if frequence is FREQUENCE.DAY:
                if market_type is MARKET_TYPE.STOCK_CN:
                    return QA_DataStruct_Stock_day(
                        res.assign(date=pd.to_datetime(res.date)
                                  ).set_index(['date',
                                               'code'],
                                              drop=False),
                        dtype='stock_day'
                    )
            elif frequence in [FREQUENCE.ONE_MIN,
                               FREQUENCE.FIVE_MIN,
                               FREQUENCE.FIFTEEN_MIN,
                               FREQUENCE.THIRTY_MIN,
                               FREQUENCE.SIXTY_MIN]:
                if market_type is MARKET_TYPE.STOCK_CN:
                    return QA_DataStruct_Stock_min(
                        res.assign(datetime=pd.to_datetime(res.datetime)
                                  ).set_index(['datetime',
                                               'code'],
                                              drop=False),
                        dtype='stock_min'
                    )
        except:
            pass
    elif isinstance(data, np.ndarray):
        try:
            res = pd.DataFrame(data, columns=default_header)
            if frequence is FREQUENCE.DAY:
                if market_type is MARKET_TYPE.STOCK_CN:
                    return QA_DataStruct_Stock_day(
                        res.assign(date=pd.to_datetime(res.date)
                                  ).set_index(['date',
                                               'code'],
                                              drop=False),
                        dtype='stock_day'
                    )
            elif frequence in [FREQUENCE.ONE_MIN,
                               FREQUENCE.FIVE_MIN,
                               FREQUENCE.FIFTEEN_MIN,
                               FREQUENCE.THIRTY_MIN,
                               FREQUENCE.SIXTY_MIN]:
                if market_type is MARKET_TYPE.STOCK_CN:
                    return QA_DataStruct_Stock_min(
                        res.assign(datetime=pd.to_datetime(res.datetime)
                                  ).set_index(['datetime',
                                               'code'],
                                              drop=False),
                        dtype='stock_min'
                    )
        except:
            pass

    elif isinstance(data, pd.DataFrame):
        index = data.index
        if isinstance(index, pd.MultiIndex):
            pass
        elif isinstance(index, pd.DatetimeIndex):
            pass
        elif isinstance(index, pd.Index):
            pass