Skip to content

Instantly share code, notes, and snippets.

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