Login using Social Account
     Continue with GoogleLogin using your credentials
Find the number of female passengers on-board from the training dataset.
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.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...