Skip to content

Commit

Permalink
BUG: get_clean_factor crashes with malformed 'groupby' data
Browse files Browse the repository at this point in the history
If 'groupby' data contains too many values,  then 'utils.get_clean_factor' and
'utils.get_clean_factor_and_forward_return' crash with meaningless error
messages.
  • Loading branch information
luca-s committed Mar 16, 2018
1 parent e443a68 commit f5b070f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alphalens/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def get_clean_factor(factor,
list(diff)))

sn = pd.Series(groupby_labels)
groupby = pd.Series(index=factor.index,
groupby = pd.Series(index=groupby.index,
data=sn[groupby.values].values)

merged_data['group'] = groupby.astype('category')
Expand Down

0 comments on commit f5b070f

Please sign in to comment.