Skip to content
Advertisement

A code to find out the count of females and males in a column using python

I want an output in a table as shown below:

JavaScript

Advertisement

Answer

Example inspired by this article

JavaScript

This prints

JavaScript

You can read more about value_counts() here.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement