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

can not work on DataFrameGroupBy apply? #226

Open
WangHHY19931001 opened this issue Dec 29, 2023 · 2 comments
Open

can not work on DataFrameGroupBy apply? #226

WangHHY19931001 opened this issue Dec 29, 2023 · 2 comments

Comments

@WangHHY19931001
Copy link

i had install swifter\swifter[notebook]\swifter[groupby] by pip,but as you see, it not work

swifter in c:\users\dell\miniconda3\envs\mrposition_update_with_py310\lib\site-packages (1.4.0)
swifter[notebook] in c:\users\dell\miniconda3\envs\mrposition_update_with_py310\lib\site-packages (1.4.0)
swifter[groupby] in c:\users\dell\miniconda3\envs\mrposition_update_with_py310\lib\site-packages (1.4.0)
pandas>=1.0.0 in c:\users\dell\miniconda3\envs\mrposition_update_with_py310\lib\site-packages (from swifter[groupby]) (2.1.4)
ray>=1.0.0 in c:\users\dell\miniconda3\envs\mrposition_update_with_py310\lib\site-packages (from swifter[groupby]) (2.9.0)

finger_df = finger_df.groupby(['f_sid', 'f_msisdn']).swifter.apply(group_bt)
File "C:\Users\dell\miniconda3\envs\mrposition_update_with_py310\lib\site-packages\pandas\core\groupby\groupby.py", line 1312, in getattr
raise AttributeError(
AttributeError: 'DataFrameGroupBy' object has no attribute 'swifter'

@chenyangkang
Copy link

chenyangkang commented Jan 25, 2024

This is mentioned in #210. Change the expression.

df.groupby('x').swifter.apply(...)-> df.swifter.groupby('x').apply(...)

@WangHHY19931001
Copy link
Author

This is mentioned in #210. Change the expression.

df.groupby('x').swifter.apply(...)-> df.swifter.groupby('x').apply(...)

may change all api to xx.swifter.xxx.apply will been batter

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

2 participants