I need to get the frequency of each element in a list when the list is in a pandas data frame columns
In data:
din=pd.DataFrame({'x':[['a','b','c'],['a','e','d', 'c']]})`
              x
0     [a, b, c]
1  [a, e, d, c]
Desired Output:
   f  x
0  2  a
1  1  b
2  2  c
3  1  d
4  1  e
I can expand the list into rows and then perform a group by but this data could be large ( million plus records ) and was wondering if there is a more efficient/direct way.
Thanks
 
     
     
     
     
    
