📅  最后修改于: 2022-03-11 14:46:33.531000             🧑  作者: Mango
# stratified split dataset by column
from sklearn.model_selection import train_test_split
df_sample, df_drop_it = train_test_split(df, train_size =0.2, stratify=df['country'])