text_html_output_1.png
import pandas as pd

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

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

train_data.shape

def getDatasetDetail(data):
    return pd.DataFrame({'Datatype': data.dtypes.astype(str), 'Non_Null_Count': data.count(axis=0).astype(int), 'Null_Count': data.isnull().sum().astype(int), 'Null_Percentage': round(data.isnull().sum() / len(data) * 100, 2), 'Unique_Values_Count': data.nunique().astype(int)}).sort_values(by='Null_Percentage', ascending=False)

train_data = train_data.loc[:, train_data.isnull().sum() / len(train_data) * 100 < 60]

train_data.drop(['PassengerId', 'Name'], axis=1, inplace=True)

getDatasetDetail(train_data)