Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
categorical_features = {"season", "yr", "mnth", "holiday", "hr", "workingday", "weekday", "weathersit"}
for feature in categorical_features:
data[feature] = data[feature].astype("category")
data.dtypes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment