Say we have a CSV file with the following data:
Name Age Gender
Bob 23 Male
Ahmed 45 Male
Alice 37 Female
Ahmed 34 Male
Mariyya 10 Female
Bilal 23 Male
How can I do the following:
- Count the number of occurrence of each name
- Order the fields based on their frequency and show the frequency. For instance,
Ahmed
should come first with 2-times.Male
should come first with 4-times. - Order based on name, and show the
Gender
in the result combined with the name.
Thanks for your support.