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
I wrote this initially for the modin issue tracker, but realised this is probably not appropriate (yet) for modin. This could actually be an upstream pandas issue too. Dumping this issue here to track for now.
Describe the problem
When a (modin) dataframe containing 0 rows, it cannot be interchanged to a library supporting the interchange protocol. This includes interchanging modin dataframes to modin.
Source code / logs
Note you have to monkey patch pandas.errors.DataError to pandas.core.base.DataError for modin to work with upstream pandas.
>>>frommodinimportpandasasmpd>>>df=mpd.DataFrame({"foo_col": mpd.Series([], dtype="int64")}) # dtype can be anything>>>frommodin.pandas.utilsimportfrom_dataframeasmodin_from_dataframe>>>modin_from_dataframe(df)
NotImplementedError: Non-stringobjectdtypesarenotsupportedyet
With modin-project/modin#4652 I also get an inscrutable error when interchanging modin dataframes with categoricals with modin itself, that I don't get using normal pandas. Traceback is too large for GitHub lol, will document properly if it persists.
I wrote this initially for the modin issue tracker, but realised this is probably not appropriate (yet) for modin. This could actually be an upstream pandas issue too. Dumping this issue here to track for now.
Describe the problem
When a (modin) dataframe containing 0 rows, it cannot be interchanged to a library supporting the interchange protocol. This includes interchanging modin dataframes to modin.
Source code / logs
Note you have to monkey patch
pandas.errors.DataError
topandas.core.base.DataError
for modin to work with upstream pandas.Full traceback
This goes for interchanging a modin dataframe to pandas,
but interchanging a pandas dataframe to modin works just fine.
System information
The text was updated successfully, but these errors were encountered: