You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cristianmtr opened this issue
Sep 8, 2022
· 1 comment
Labels
bug 🦗Something isn't workingExternalPull requests and issues from people who do not regularly contribute to modinP2Minor bugs or low-priority feature requests
@cristianmtr thank you for reporting this bug. I can reproduce it at version c9fc326. The bug only applies to empty dataframes. For empty dataframes we default to pandas and end up using the pandas groupby result.
You can work around this bug by
doing your groupby on the pandas dataframe
doing a groupby operation like sum
converting the result to a modin series or dataframe
e.g for your snippet above you can do md_pd.DataFrame(pandas_df.sum())
I don't see an easy fix for this bug. Probably the right thing is to not default to pandas on the groupby call, but instead default to pandas for the operations on the groupby object, e.g. groupby.sum. The default to pandas would have to convert the original dataframe to pandas, then do the operation on that pandas object.
bug 🦗Something isn't workingExternalPull requests and issues from people who do not regularly contribute to modinP2Minor bugs or low-priority feature requests
System information
Describe the problem
Groupby returns of pandas type. Shouldn't it return of modin type?
The text was updated successfully, but these errors were encountered: