Write a program that loads and subsets the dataset intitanic.csv.
- Load the pandas module. Load the dataset in titanic.csv astitanic.
- Create a new data frame, df, by subsetting the titanic dataframe to include instances with male first class passengers who areover 18 years old.
- Using the template from this link, create and upload a stripplot where the data is grouped by the city the passengers embarkedand by survival status.
# load pandas module as pd titanic = # load the titanic.csv dataset df = # subset titanic to include male passengers in first class over 18 years old print(df.head())
Write a program that loads and subsets the dataset in titanic.csv. - Load the pandas module. Load the dataset in titanic
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am