Beispiel #1
0
def QA_fetch_future_list_adv(collections=DATABASE.future_list):
    '''
    '获取股票列表'
    :param collections: mongodb 数据库
    :return: DataFrame
    '''
    future_list_items = QA_fetch_future_list()
    if len(future_list_items) == 0:
        print("QA Error QA_fetch_future_list_adv call item for item in collections.find() return 0 item, maybe the DATABASE.future_list is empty!")
        return None
    return future_list_items
Beispiel #2
0
def QA_fetch_future_list_adv(collections=DATABASE.future_list):
    '''
    '获取股票列表'
    :param collections: mongodb 数据库
    :return: DataFrame
    '''
    future_list_items = QA_fetch_future_list()
    if len(future_list_items) == 0:
        print(
            "QA Error QA_fetch_future_list_adv call item for item in collections.find() return 0 item, maybe the DATABASE.future_list is empty!"
        )
        return None
    return pd.DataFrame(future_list_items).drop(
        '_id', axis=1, inplace=False).set_index('code', drop=False)