#%%
strs = "Survived Pclass Sex Age SibSp Parch Fare Embarked"
clos = strs.split(" ")
print(clos)
#%%
x_datas = data[clos]
print(x_datas.head())
#%%
print(x_datas.isnull().sum())
#%%
x_datas["Age"] = x_datas["Age"].fillna(x_datas["Age"].mean())
x_datas["Embarked"] = x_datas["Embarked"].fillna(x_datas["Embarked"].mode()[0])
#x_datas["Sex"] = pd.get_dummies(x_datas["Sex"])
x_datas = pd.get_dummies(x_datas,columns=["Pclass","Sex","Embarked"])
x_datas["Age"]/=100
x_datas["Fare"]/=100
print(x_datas.isnull().sum())
print(x_datas.head())
#%%
seq = int(0.75*(len(x_datas)))
X ,Y = x_datas.iloc[:,1:],x_datas.iloc[:,0]
X_train,Y_train,X_test,Y_test = X[:seq],Y[:seq],X[seq:],Y[seq:]