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

Downcasting integer columns after encoding #62

Open
fabien-vavrand opened this issue Jul 1, 2020 · 0 comments
Open

Downcasting integer columns after encoding #62

fabien-vavrand opened this issue Jul 1, 2020 · 0 comments

Comments

@fabien-vavrand
Copy link

NumericalEncoder currently encodes categories to integers, without considering the integer type. Downcasting integers to int8 or int16 when possible could sometimes significantly reduce memory and avoid some memory overhead.

import pandas as pd
from aikit.transformers import NumericalEncoder
df = pd.DataFrame(data={'a': ['a', 'b', 'c'] * 1000})
x = NumericalEncoder().fit_transform(df)
x.dtypes
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

1 participant