Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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