Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left
02 D 00 H : 36 M : 24 S Apply NowFind 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.
Note - Having trouble with the assessment engine? Follow the steps listed here
Please login to comment
0 Comments
There are 4 new comments.