text_plain_output_1.png
import numpy as np

import pandas as pd

train_data = pd.read_csv('/kaggle/input/titanic/train.csv')
x_train = pd.read_csv('/kaggle/input/titanic/train.csv')
x_test = pd.read_csv('/kaggle/input/titanic/test.csv')
y_train = np.array(x_train['Survived'].copy())
id_test = np.array(x_test['PassengerId'].copy())

labels = ['Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked']
x_train = x_train[labels]
x_test = x_test[labels]

x_train.info()