ShichenXie / scorecardpy

Scorecard Development in python, 评分卡
http://shichen.name/scorecard
MIT License
725 stars 301 forks source link

Update of pandas #82

Closed rossowska closed 1 year ago

rossowska commented 3 years ago

Hi, would it be possible to make the code compatible with the latest version of pandas? I updated pandas and scorecardpy.woebin does not work (MergeError: Can only pass argument "on" OR "left_index" and "right_index", not a combination of both.)

ShichenXie commented 3 years ago

The latest version of scorecardpy on the Github should already compatible with the latest version of pandas. You can upgrade it and try again.

theinexorable commented 2 years ago

Had the same issue, it's not pandas but wrong code there. Line 115 from scorecardpy / woebin.py is commented here, but somehow have it working in my local installation. So when you go to: dtm_sv = pd.merge(dtm.fillna("missing"), sv_df[['value']].fillna("missing"), how='inner', on='value', right_index=True) simply remove right_index=True and save the file. Run again (reload the module) and voila!

IuVI commented 2 years ago

Had the same issue, it's not pandas but wrong code there. Line 115 from scorecardpy / woebin.py is commented here, but somehow have it working in my local installation. So when you go to: dtm_sv = pd.merge(dtm.fillna("missing"), sv_df[['value']].fillna("missing"), how='inner', on='value', right_index=True) simply remove right_index=True and save the file. Run again (reload the module) and voila!

Thanks a lot! Your approach works great.

ShichenXie commented 1 year ago

Please upgrade scorecardpy to the version on the Github. I have test it on pandas == 1.3.4.