Click here to Skip to main content
15,793,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a csv file with data like this
892,3,"Kelly, Mr. James",male,34.5,0,0,330911,7.8292,,Q
893,3,"Wilkes, Mrs. James (Ellen Needs)",female,47,1,0,363272,7,,S
and so on 

I want to count how many of these names in the csv file include ‘Mr.’ and ‘Mrs’ and other
and using column 'sex' I want to print the number of male and female passengers.

What I have tried:

I don't know how to proceed with this task.
<script src=''></script>
let newcsv = 'the link to csv ';

d3.csv(newcsv, function(data) {
 console.log( data.Name );
Updated 17-Jan-22 8:42am

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900