text_plain_output_1.png
from pathlib import Path

from sklearn.model_selection import train_test_split, GridSearchCV, RandomizedSearchCV, KFold

import pandas as pd

INPUT = Path('../input/tabular-playground-series-aug-2021')
train = pd.read_csv(INPUT / 'train.csv')
test = pd.read_csv(INPUT / 'test.csv')

train.shape

train.isnull().any().sum()

X = train

kf = KFold(n_splits=10, shuffle=True, random_state=42)
for fold, (train_indices, valid_indices) in enumerate(kf.split(X=X)):
    X.loc[valid_indices, 'kfold'] = fold

X.head()