title: Pivot with Pandas Python to get booleans
body: <p>I have the following csv: <a href="https://github.com/antonio1695/Python/blob/master/nearBPO/facturas.csv" rel="nofollow">https://github.com/antonio1695/Python/blob/master/nearBPO/facturas.csv</a></p>
  
  <p>From which I created a dataframe with the following code:</p>
  
  <pre><code>import pandas as pd
  df = pd.read_csv("C:/Users/Antonio/Desktop/nearBPO/facturas.csv", encoding = "ISO-8859-1")
  df_du = df.iloc[:,[0,5]]
  dfv = df_du.groupby('UUID')['Desc'].apply(list)
  df2 = dfv.reset_index()
  </code></pre>
  
  <p>*Note: I'm taking the csv locally.</p>
  
  <p>Which after the code looks like this: </p>
  
  <pre><code>    UUID                                       Desc
  0   0019A60D-78F8-E341-8D3E-9786201FE017    [TRANSPORTACION DE PASAJEROS]
  1   003B8B8F-7017-E441-8C84-8C0EA577E29D    [SERVICIO POR HORA]
  2   00536BC1-1B10-4146-A59B-36613090EF10    [CONSUMO Y RENTA DE SALA DE JUNTAS]
  3   005BBAEE-ABEC-E341-8CED-15DA22D11F65    [VERIFICACION HOLOGRAMA DOBLE CERO]
  4   006C5F2E-CAE0-4498-9288-0241C1949D8A    [C Meg XT Clas CH, Com Whop Q CH, C Meg XT Cla...
  5   0075D1FC-996D-4784-9755-2F4598D16163    [Consumo]
  </code></pre>
  
  <p>I would like to make a dataframe which had each element of the 'Desc' column as a column and each UUID as a row where i would have a 1 (or True) if the UUID had the corresponding 'Desc' in it. </p>
  
  <p>Example of what I want:</p>
  
  <pre><code>UUID                                     Transportacion de pasajeros    Servicio por hora
  0019A60D-78F8-E341-8D3E-9786201FE017     1                              0
  003B8B8F-7017-E441-8C84-8C0EA577E29D     0                              1
  </code></pre>
  
  <p>What I was trying was to make was a matrix of 0 with an if to make the 1's. Afterwards I would merge it and pivot it.  However, since the some 'Desc' are the same, I didn't know how big I should do it. And it seems to come along with many other flaws in the merge part. </p>