I have a DataFrame in python by using pandas which has 3 columns and 80.000.000 rows.
The Columns are: {event_id,device_id,category}. here is the first 5 rows of my df
each device has many events and each event can have more than one category.
I want to run Apriori algorithm to find out which categories seem together.
My idea is to create a list of lists[[]]: to save the categories which are in the same event for each device. like: [('a'),('a','b')('d'),('s','a','b')] then giving the list of lists as transactions to the algorithm. I need help to create the list of lists.
If you have better idea please tell me because I am new in Python and this was the only way I found out.