Closed happyjay23 closed 5 years ago
能发现你把运行的代码给我看看嘛?
你好,我就是运行的官方演示代码,在Python3.7下运行的,
train_woe = sc.woebin_ply(train, bins_adj)
test_woe = sc.woebin_ply(test, bins_adj)
就是这段,sc.woebin_ply
------------------------原始邮件------------------------
发信人:xiaohangnotifications@github.com
时间:12:56:56 下午
收信人:ShichenXie/scorecardpyscorecardpy@noreply.github.com
抄送:happyjay23happyjay23@sina.com ,Authorauthor@noreply.github.com
标题:Re: [ShichenXie/scorecardpy] ValueError: fill value must be in categories pandas Version: 0.24.2 (#18)
能发现你把运行的代码给我看看嘛? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
不知道你的python环境是怎么配置的。建议使用anaconda
使用的最新anaconda和py37下试的
------------------------原始邮件------------------------
发信人:Shichennotifications@github.com
时间:07:33:18 下午
收信人:ShichenXie/scorecardpyscorecardpy@noreply.github.com
抄送:happyjay23happyjay23@sina.com ,Authorauthor@noreply.github.com
标题:Re: [ShichenXie/scorecardpy] ValueError: fill value must be in categories pandas Version: 0.24.2 (#18)
不知道你的python环境是怎么配置的。建议使用anaconda — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
issue + 1
issue + 1
导致报错的原因就是,pandas最新版本0.24.2和目前的scorecardpy版本不兼容,我尽快改正scorecardpy。 然后,救火的办法是,把pandas版本降级: 1.找到anacoda prompt软件,以管理员身份运行,卸载最新的pandas,命令是:conda uninstall pandas 2.安装老一点的pandas,命令时:conda install pandas==0.23.2 PS:我亲自把pandas升级了一下,报错;然后按照这个办法降级,就不再报错了,可以正常使用了。
我找到解决方法了,在新的pull requests里
RemoteTraceback Traceback (most recent call last) RemoteTraceback: """ Traceback (most recent call last): File "D:\Anaconda3\lib\multiprocessing\pool.py", line 121, in worker result = (True, func(args, kwds)) File "D:\Anaconda3\lib\multiprocessing\pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "D:\Anaconda3\lib\site-packages\scorecardpy\woebin.py", line 950, in woepoints_ply1 dtx = dtx.fillna('missing').assign(rowid = dtx.index) File "D:\Anaconda3\lib\site-packages\pandas\core\frame.py", line 4034, in fillna downcast=downcast, kwargs) File "D:\Anaconda3\lib\site-packages\pandas\core\generic.py", line 6123, in fillna downcast=downcast) File "D:\Anaconda3\lib\site-packages\pandas\core\internals\managers.py", line 525, in fillna return self.apply('fillna', kwargs) File "D:\Anaconda3\lib\site-packages\pandas\core\internals\managers.py", line 395, in apply applied = getattr(b, f)(kwargs) File "D:\Anaconda3\lib\site-packages\pandas\core\internals\blocks.py", line 1834, in fillna values = values.fillna(value=value, limit=limit) File "D:\Anaconda3\lib\site-packages\pandas\util_decorators.py", line 188, in wrapper return func(args, **kwargs) File "D:\Anaconda3\lib\site-packages\pandas\core\arrays\categorical.py", line 1784, in fillna raise ValueError("fill value must be in categories") ValueError: fill value must be in categories """
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last)