Project - Predicting Titanic Passenger Survival using Machine Learning and Python

You are currently auditing this course.
8 / 21

Titanic Machine Learning Project - Find Number of Female Passengers

Find the number of female passengers on-board from the training dataset.

INSTRUCTIONS

Use the value_count() function to find the number of female passengers on-board from the training dataset. The gender of passengers can be found using the "Sex" column.

train_data["Sex"].value_counts()[1]

Note: The [1] in the train_data["Sex"].value_counts()[1] gives you the value of the second element.

Get Hint See Answer

Loading comments...