Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created April 18, 2021 18:09
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 AyishaR/fe0c88f6ad19860ec143a83e9e47a7a4 to your computer and use it in GitHub Desktop.
Save AyishaR/fe0c88f6ad19860ec143a83e9e47a7a4 to your computer and use it in GitHub Desktop.
# Input attributes (every column except the last)
X = df[df.columns.tolist()[:-1]]
# Output attribute - one-hot encoded
y = pd.get_dummies(df[64])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment