title: Finding unique values in a .CSV
body: <p>I have a .CSV data file with a ton, and I mean a TON (80+ million lines) of data.</p>
  
  <p>The data is all in two columns, and looks like the following:</p>
  
  <pre><code> src      |      dst 
  123123    |     456456
  321321    |     654654
  987987    |     789789
  123123    |     456456
  </code></pre>
  
  <p>and so on for 80 million lines.</p>
  
  <p>(note: I know that the delimiter should be a ',' in a .CSV, but in this case it's an '|' . The file extension is still .CSV)</p>
  
  <p>I'm trying to figure out how to write a program that will read in all the data, and print out the number of repeated values in the 'src' field. For example, in my example, the output would look like '123123: showed up 2 times' </p>
  
  <p>I've tried a few solutions, most notably this: <a href="https://stackoverflow.com/questions/35344282/how-to-read-the-csv-file-properly-if-each-row-contains-different-number-of-field">How to read the csv file properly if each row contains different number of fields (number quite big)?</a></p>
  
  <p>I wrote a loop to split the 'src' from the 'dst' with 'newData' being the .CSV file</p>
  
  <pre><code>    //go through each line and split + link the data to src/dst
    data.forEach(function (line) {
      newData = line.split('|'); //note, split returns an array
  
      let src = newData[0]; //src from data.csv
      let dst = newData[1]; //dst from data.csv
  
  
      //test print the data
      //console.log(newData);
    });
  </code></pre>
  
  <p>But am having issues getting a count duplicate values from the newData[0] (src) column.</p>