image_output_1.png
from sklearn.model_selection import train_test_split

import pandas as pd

wine_quality_df = pd.read_csv('/kaggle/input/wine-quality-dataset/WineQT.csv', index_col='Id')

from sklearn.model_selection import train_test_split
train_df, test_df = train_test_split(wine_quality_df, test_size=0.2, stratify=wine_quality_df['quality'])
train_df, val_df = train_test_split(train_df, test_size=1 / 8, stratify=train_df['quality'])
(len(train_df), len(val_df), len(test_df))