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

[enhance] Replace column selectors with sklearn funcs #393

Open
nabenabe0928 opened this issue Feb 28, 2022 · 0 comments
Open

[enhance] Replace column selectors with sklearn funcs #393

nabenabe0928 opened this issue Feb 28, 2022 · 0 comments
Labels
enhancement New feature or request not urgent This pull request does not need immediate attention.

Comments

@nabenabe0928
Copy link
Contributor

Currently, we are picking columns by ourselves, but since sklearn has its own column selectors, we can use it.

The selectors for numerical and categorical columns can be simply implemented by the following:

import numpy as np
from sklearn.compose import make_column_selector as selector

numerical_col_selector = selector(dtype_include=np.number)
categorical_col_selector = selector(dtype_exclude=np.number)
@ravinkohli ravinkohli added enhancement New feature or request not urgent This pull request does not need immediate attention. labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request not urgent This pull request does not need immediate attention.
Projects
None yet
Development

No branches or pull requests

2 participants