I have a pandas DataFrame where each cell in a column is a 2d array of items.
EX: Observation 1 has column items
with values ['Baseball', 'Glove','Snack']
When I use .unique
on the individual cells, each cell gets analyzed based on the whole arrays value, not individual values in the array.
How can I iterate through each array in each cell to determine the true unique amount of items in the column? Thanks
Items
0 ['Baseball', 'Hockey Stick', 'Mit']
1 ['Mit', 'Tennis Racket']
2 ['Baseball', 'Helmet']
These all return as unique values, I would like to get the unique count for each value in each list.