Skip to content

Instantly share code, notes, and snippets.

@ranpelta
Created July 18, 2020 06:49
Show Gist options
  • Save ranpelta/80d50d96ac5a0840bfe57a5ab6270bf6 to your computer and use it in GitHub Desktop.
Save ranpelta/80d50d96ac5a0840bfe57a5ab6270bf6 to your computer and use it in GitHub Desktop.
#separate X and y only for the train data (for now)
X_train = train.drop(y_col,axis=1).copy()
y_train = train[[y_col]].copy() # the double brakets here are to keep the y in a dataframe format, otherwise it will be pandas Series
print(X_train.shape, y_train.shape)
>>> (28916, 3) (28916, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment