I am trying to use Modin package to import a sparse matrix created with scipy (specifically, a scipy.sparse.csr_matrix).
Invoking the method:
from modin import pandas as pd
pd.DataFrame.sparse.from_spmatrix(mat)
I am getting the following AttributeError:
AttributeError Traceback (most recent call last)
C:\Users\BERGAM~1\AppData\Local\Temp/ipykernel_37436/3032405809.py in <module>
----> 1 pd.DataFrame.sparse.from_spmatrix(mat)
C:\Miniconda3\envs\persolite_v0\lib\site-packages\modin\pandas\accessor.py in from_spmatrix(cls, data, index, columns)
109 @classmethod
110 def from_spmatrix(cls, data, index=None, columns=None):
--> 111 return cls._default_to_pandas(
112 pandas.DataFrame.sparse.from_spmatrix, data, index=index, columns=columns
113 )
C:\Miniconda3\envs\persolite_v0\lib\site-packages\modin\pandas\accessor.py in _default_to_pandas(self, op, *args, **kwargs)
78 Result of operation.
79 """
---> 80 return self._parent._default_to_pandas(
81 lambda parent: op(parent.sparse, *args, **kwargs)
82 )
AttributeError: 'function' object has no attribute '_parent'
While using the original pandas API, it works.
Anyone with a similar problem? Thanks for the support