text_plain_output_1.png
from sklearn.preprocessing import Normalizer

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df_train = pd.read_csv('/kaggle/input/titanic/train.csv')

df_test = pd.read_csv('/kaggle/input/titanic/test.csv')

(df_train.shape, df_test.shape)

df = pd.concat([df_train, df_test], axis=0)

df.isnull().sum()

df.drop(['Name', 'Cabin'], axis=1, inplace=True)

df.groupby('Sex').size()

df.drop(['Ticket'], axis=1, inplace=True)

df.isnull().sum()

df.isna().sum()

df_train = df[df['Survived'].isna() == False]

y = df_train.loc[:, 'Survived']
y

X = df_train.drop(['Survived'], axis=1)
X

norm = Normalizer()
X = norm.fit_transform(X)
X