Skip to content

Commit

Permalink
use MultiIndex.set_names for pandas 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhu, Kevin authored and Zhu, Kevin committed Mar 6, 2020
1 parent 6f9b1ff commit e1d2531
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 e1d2531

Please sign in to comment.