Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created May 29, 2019 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/b87056ab9c1e3eeea5725ad7310c7aff to your computer and use it in GitHub Desktop.
Save NMZivkovic/b87056ab9c1e3eeea5725ad7310c7aff to your computer and use it in GitHub Desktop.
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