title: Get unique values from pandas series of lists
body: <p>I have a column in DataFrame containing list of categories. For example:</p>
  
  <pre><code>0                                                    [Pizza]
  1                                 [Mexican, Bars, Nightlife]
  2                                  [American, New, Barbeque]
  3                                                     [Thai]
  4          [Desserts, Asian, Fusion, Mexican, Hawaiian, F...
  6                                           [Thai, Barbeque]
  7                           [Asian, Fusion, Korean, Mexican]
  8          [Barbeque, Bars, Pubs, American, Traditional, ...
  9                       [Diners, Burgers, Breakfast, Brunch]
  11                                [Pakistani, Halal, Indian]
  </code></pre>
  
  <p>I am attempting to do two things:</p>
  
  <p>1) Get unique categories - My approach is have a empty set, iterate through series and append each list.</p>
  
  <p>my code:</p>
  
  <pre><code>unique_categories = {'Pizza'}
  for lst in restaurant_review_df['categories_arr']:
      unique_categories = unique_categories | set(lst)
  </code></pre>
  
  <p>This give me a set of unique categories contained in all the lists in the column.</p>
  
  <p>2) Generate pie plot of category counts and each restaurant can belong to multiple categories. For example: restaurant 11 belongs to Pakistani, Indian and Halal categories. My approach is again iterate through categories and one more iteration through series to get counts.</p>
  
  <p>Are there simpler or elegant ways of doing this?</p>
  
  <p>Thanks in advance.</p>