text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

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

import seaborn as sns

titanic = pd.read_csv('/kaggle/input/test-file/tested.csv')

titanic.shape

titanic_gender = titanic['Sex'].value_counts(normalize=True)

wp = {'linewidth': 1, 'edgecolor': 'black'}
plt.axis('equal')
plt.tight_layout()

titanic.groupby('Sex').Survived.sum()

titanic_class = titanic.groupby('Pclass')
titanic_class

sns.barplot(x=titanic['Pclass'], y=titanic['Survived'])
plt.title('People who survived per class')
plt.xlabel('Pclass')
plt.ylabel('Survived')