Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

woebin_new function has attribute error due to. "pandas reset_index() has not attribute called 'name'" #116

Open
SenHan-lionheart opened this issue Dec 19, 2024 · 0 comments

Comments

@SenHan-lionheart
Copy link

SenHan-lionheart commented Dec 19, 2024

RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/lib/python3.10/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/home/jupyter/.local/lib/python3.10/site-packages/awxriskmodel/scorecardpy_awx/woebin_new.py", line 739, in woebin2
bin_list = woebin2_chimerge(
File "/home/jupyter/.local/lib/python3.10/site-packages/awxriskmodel/scorecardpy_awx/woebin_new.py", line 608, in woebin2_chimerge
binning_chisq = add_chisq(initial_binning)
File "/home/jupyter/.local/lib/python3.10/site-packages/awxriskmodel/scorecardpy_awx/woebin_new.py", line 585, in add_chisq
chisq_df.groupby('brkp', group_keys=False).apply(lambda df: sum(df.a+df.a_lag)).reset_index(name='a_sum'))
TypeError: DataFrame.reset_index() got an unexpected keyword argument 'name'
"""
here is doc for pandas https://github.com/pandas-dev/pandas/blob/v2.2.3/pandas/core/frame.py#L6239-L6483
only have "names" rather than "name"
@ShichenXie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant