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

DataFrameMapper with df_out should preserve categorical data #81

Open
mratsim opened this issue Feb 19, 2017 · 1 comment
Open

DataFrameMapper with df_out should preserve categorical data #81

mratsim opened this issue Feb 19, 2017 · 1 comment

Comments

@mratsim
Copy link

mratsim commented Feb 19, 2017

DataFrameMapper transformation removes the "category" dtype from dataframe columns

Categorical status can be checked with:
hasattr(df['categorical_column'], 'cat')

Some classifiers like LightGBM can auto detect categorical data from dataframes and handle them very efficiently without OneHotEncoding.

@MarcusJones
Copy link

Just ran into this one, I wrote a custom transformer specifically to convert columns to 'category' dtype. Had no idea why it wasn't working until I found this issue. Would this be difficult to implement?

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