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

fix some small bug

This commit is contained in:
Young
2020-11-14 08:23:19 +00:00
parent ea5f14ce12
commit 7a79028a72
6 changed files with 40 additions and 17 deletions

View File

@@ -52,4 +52,4 @@ def fetch_df_by_index(
idx_slc = (selector, slice(None, None))
if get_level_index(df, level) == 1:
idx_slc = idx_slc[1], idx_slc[0]
return df.loc(axis=0)[idx_slc]
return df.loc[pd.IndexSlice[idx_slc], ] # This could be faster than df.loc(axis=0)[idx_slc]