title: How to aggregate CSV data with group by in Java?
body: <p>Assume that i have a following CSV file of Action log of an application. This csv may contain 3 - 4 million rows.</p>
  
  <pre><code>Company, ActionsType, Action
  ABC, Downloaded, Tutorial 1
  ABC, Watched, Tutorial 2
  PQR, Subscribed, Tutorial 1
  ABC, Watched, Tutorial 2
  PQR, Subscribed, Tutorial 3
  XYZ, Subscribed, Tutorial 1
  XYZ, Watched, Tutorial 3
  PQR, Downloaded, Tutorial 1
  </code></pre>
  
  <p>Is there anyway way to aggregate those data by grouping by Company name and show actionType counters as column like shown below using Java? </p>
  
  <pre><code>Company, Downloaded, Watched, Subscribed
  ABC, 1, 2, 0
  PQR, 1, 0, 2
  XYZ, 0, 1, 1
  </code></pre>
  
  <p>I thought of loading CSV file to a List using OpenCSV, but is it efficient for a csv file of millions of data?</p>