Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created April 27, 2020 05:28
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 lakshay-arora/9937ecb233a157ec2dabc7c760d596e0 to your computer and use it in GitHub Desktop.
Save lakshay-arora/9937ecb233a157ec2dabc7c760d596e0 to your computer and use it in GitHub Desktop.
# train test split
train, test = train_test_split(data, test_size = 0.2, stratify = data['label'], random_state=21)
# get the shape of train and test split.
train.shape, test.shape
## >> ((25569, 3), (6393, 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment