Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib as mpl
- import matplotlib.pyplot as plt
- # Shows a pie chart of all survivors and their embarked destination
- train_copy_survived = train_copy[(train_copy['Survived'] == 1)]
- embarked_sizes = train_copy['Embarked'].value_counts()
- plt.pie(x=embarked_sizes.values, labels=embarked_sizes.index)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement