Skip to content

Commit

Permalink
Merge pull request quantopian#364 from altquant/pandas-1.0
Browse files Browse the repository at this point in the history
use MultiIndex.set_names for pandas 1.0
  • Loading branch information
twiecki authored Mar 9, 2020
2 parents 6f9b1ff + e1d2531 commit ced180e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions alphalens/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ def compute_forward_returns(factor,
df = df[column_list]

df.index.levels[0].freq = freq
df.index.levels[0].name = "date"
df.index.levels[1].name = "asset"
df.index.set_names(['date', 'asset'], inplace=True)

return df

Expand Down

0 comments on commit ced180e

Please sign in to comment.