title: Pandas: reshaping data
body: <p>I have a pandas Series which presently looks like this:</p>
  
  <pre><code>14    [Yellow, Pizza, Restaurants]
  ...
  160920                  [Automotive, Auto Parts &amp; Supplies]
  160921       [Lighting Fixtures &amp; Equipment, Home Services]
  160922                 [Food, Pizza, Candy Stores]
  160923           [Hair Removal, Nail Salons, Beauty &amp; Spas]
  160924           [Hair Removal, Nail Salons, Beauty &amp; Spas]
  </code></pre>
  
  <p>And I want to radically reshape it into a dataframe that looks something like this...</p>
  
  <pre><code>      Yellow  Automotive  Pizza
  14       1         0        1
  …           
  160920   0         1        0
  160921   0         0        0
  160922   0         0        1
  160923   0         0        0
  160924   0         0        0
  </code></pre>
  
  <p>ie. a logical construction noting which categories each observation(row) falls into.</p>
  
  <p>I'm capable of writing for loop based code to tackle the problem, but given the large number of rows I need to handle, that's going to be very slow. </p>
  
  <p>Does anyone know a vectorised solution to this kind of problem? I'd be very grateful.</p>
  
  <p>EDIT: there are 509 categories, which I do have a list of.</p>