Assume that i have a following CSV file of Action log of an application. This csv may contain 3 - 4 million rows.
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
Is there anyway way to aggregate those data by grouping by Company name and show actionType counters as column like shown below using Java?
Company, Downloaded, Watched, Subscribed
ABC, 1, 2, 0
PQR, 1, 0, 2
XYZ, 0, 1, 1
I thought of loading CSV file to a List using OpenCSV, but is it efficient for a csv file of millions of data?