application_vnd.jupyter.stderr_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df1 = pd.read_csv('../input/train.csv')
df2 = pd.read_csv('../input/test.csv')

df12 = df1.fillna(df1.mean())

i = df1[['Age', 'Fare', 'Survived']]
plt.style.use('seaborn-colorblind')

corr = df1.corr()

freq_1 = pd.crosstab(index=df1['Survived'], columns=df1['Pclass'])
freq_2 = pd.crosstab(index=df1['Survived'], columns=df1['Sex'])
freq_3 = pd.crosstab(index=df1['Survived'], columns=df1['SibSp'])
freq_4 = pd.crosstab(index=df1['Survived'], columns=df1['Parch'])
freq_5 = pd.crosstab(index=df1['Survived'], columns=df1['Pclass'])
freq_6 = pd.crosstab(index=df1['Survived'], columns=df1['Embarked'])
l = [freq_1, freq_2, freq_3, freq_4, freq_5, freq_6]
for i in l:
    print(i)