text_plain_output_1.png
from sklearn.model_selection import train_test_split

import pandas as pd

train = pd.read_csv('/kaggle/input/house-prices-advanced-regression-techniques/train.csv', index_col=[0])
test = pd.read_csv('/kaggle/input/house-prices-advanced-regression-techniques/test.csv', index_col=[0])
sample = pd.read_csv('/kaggle/input/house-prices-advanced-regression-techniques/sample_submission.csv', index_col=[0])

train_clean = train.drop(columns=['MiscFeature', 'Fence', 'PoolQC', 'FireplaceQu', 'Alley'])
X = train_clean.drop(columns=['SalePrice'])
y = train_clean[['SalePrice']]

from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
print(X_train.shape, X_test.shape, y_train.shape, y_test.shape)