Skip to content

Instantly share code, notes, and snippets.

@securetorobert
Created July 12, 2018 00:43
Show Gist options
  • Save securetorobert/fecf3de2aa804a1ad4a2310629537c0e to your computer and use it in GitHub Desktop.
Save securetorobert/fecf3de2aa804a1ad4a2310629537c0e to your computer and use it in GitHub Desktop.
Train-test-split of Boston housing data
#create our X and y
X = train_df.drop('medv', axis=1)
y = train_df['medv']
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42, test_size=0.3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment