text_plain_output_1.png image_output_2.png image_output_1.png
from sklearn.model_selection import train_test_split

import pandas as pd

labels = pd.read_csv('../input/train.csv')
sub = pd.read_csv('../input/sample_submission.csv')
train_path = '../input/train/train/'
test_path = '../input/test/test/'

dtrain, dval = train_test_split(labels, stratify=labels.has_cactus, test_size=0.1)
(dtrain.shape, dval.shape)