Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created October 15, 2019 06:54
Show Gist options
  • Save MariaLavrovskaya/c5f978e780d38326f4611803e916ead0 to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/c5f978e780d38326f4611803e916ead0 to your computer and use it in GitHub Desktop.
airbnb_17
#From labels to dummy
from sklearn.preprocessing import OneHotEncoder
ohe = OneHotEncoder(sparse=False)
X_train_ohe = ohe.fit_transform(X_train_le)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment