Skip to content

Commit

Permalink
Update pandas_util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
microprediction authored Jan 9, 2023
1 parent 4ce9dab commit f5ae095
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions winning/pandas_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _add_ability_implied(df, ability_col: str, new_col: str, density, unit):
return df

kwargs = {'ability_col': ability_col, 'new_col': new_col, 'density': density, 'unit': unit}
return df.groupby(by).apply(_add_ability_implied, **kwargs)
return df.groupby(by, group_keys=False).apply(_add_ability_implied, **kwargs)


def add_centered_ability_to_dataframe(df, prob_col, by:str, density, unit, new_col:str):
Expand All @@ -51,7 +51,7 @@ def _add_ability(df, prob_col, new_col, density, unit):
return df

kwargs = {'prob_col': prob_col, 'new_col': new_col, 'density': density,'unit':unit}
return df.groupby(by).apply(_add_ability, **kwargs)
return df.groupby(by, group_keys=False).apply(_add_ability, **kwargs)


def add_skew_normal_ability_to_dataframe(df, by: str, prob_col='p', new_col='ability', L=STD_L, scale=STD_SCALE, unit=STD_UNIT, a=STD_A, loc=0.0):
Expand Down

0 comments on commit f5ae095

Please sign in to comment.