Question: import pandas as pd import matplotlib.pyplot as plt import seaborn as sns titanic = # load titanic.csv first _ south = # subset the titanic
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
titanic # load titanic.csv
firstsouth # subset the titanic dataset to include first class passengers who embarked in Southampton
secondthird # subset the titanic dataset to include either second or third class passengers
printfirstsouth.head
printsecondthird.head
# Set the style of the bar charts
snssetthemestyle"whitegrid", colorcodesTrue
# Create a bar chart for the first class passengers who embarked in Southampton grouped by sex
# Your code here
pltsavefigbarpng
# Create a bar chart for the second and third class passengers grouped by survival status
# Your code here
pltlegendlabels title "survived"
pltsavefigbarpng
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
