image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import warnings

warnings.simplefilter(action='ignore', category=FutureWarning)
pd.set_option('display.float_format', lambda x: '%.3f' % x)

train = pd.read_csv('../input/titanic/train.csv', index_col='PassengerId')
test = pd.read_csv('../input/titanic/test.csv', index_col='PassengerId')

titanic_dict = {'survived': 'survived', 'Pclass': 'Ticket class', 'sex': 'Sex', 'Age': 'Age in years', 'Sibsp': '# of siblings / spouses aboard the Titanic', 'parch': '# of parents / children aboard the Titanic', 'ticket': 'Ticket number', 'Fare': 'Passenger fare', 'cabin': 'Cabin number', 'Embarked': 'Port of Embarkation (C = Cherbourg, Q = Queenstown, S = Southampton)'}

train.isnull().sum()

sns.set(font_scale=1.4)

sns.set_style('whitegrid')

sns.set_style('whitegrid')

plt.figure(figsize=(10, 6))
sns.distplot(train['Age'].dropna(), kde=False, color='darkred', bins=30)
plt.title('Histogram of passengers age')
plt.show()