We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some packages convert the dataframe type into other types that have a similar interface (modin/dask).
This causes issues with sklearn-pandas, more specifically this function: https://github.com/scikit-learn-contrib/sklearn-pandas/blob/master/sklearn_pandas/dataframe_mapper.py#L311
I fixed this issue by replacing
def get_dtype(self, ex): if isinstance(ex, np.ndarray) or sparse.issparse(ex): return [ex.dtype] * ex.shape[1] elif isinstance(ex, pd.DataFrame): return list(ex.dtypes) else: raise TypeError(type(ex))
with
def get_dtype(self, ex): if isinstance(ex, np.ndarray) or sparse.issparse(ex): return [ex.dtype] * ex.shape[1] else: return list(ex.dtypes)
But there must be a better solution. How could we handle those separate types of dataframes?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some packages convert the dataframe type into other types that have a similar interface (modin/dask).
This causes issues with sklearn-pandas, more specifically this function:
https://github.com/scikit-learn-contrib/sklearn-pandas/blob/master/sklearn_pandas/dataframe_mapper.py#L311
I fixed this issue by replacing
with
But there must be a better solution. How could we handle those separate types of dataframes?
The text was updated successfully, but these errors were encountered: