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