1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 22:36:55 +08:00

datahandler support explicit selector & PortAnaRecord support strategy instance

This commit is contained in:
Dong Zhou
2020-11-27 09:00:43 +08:00
parent 6b4156ab9f
commit ad21092375
2 changed files with 5 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ def fetch_df_by_index(
-------
Data of the given index.
"""
# level = None -> use selector directly
if level == None:
return df.loc(axis=0)[selector]
# Try to get the right index
idx_slc = (selector, slice(None, None))
if get_level_index(df, level) == 1: