title: How can a create a percentage matrix based on a dataframe
body: <p>I have a dataframe that looks like that :</p>
  <pre><code>data = {'Place A':['New York', 'Oslo', 'Oslo'], 'Place B':['Paris','London','London'], 'Type':['A','B','A'], 'Number' : [34,42,24]}
  df = pd.DataFrame(data)
  print(df)
  
  </code></pre>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Place A</th>
  <th>Place B</th>
  <th>Type</th>
  <th>Number</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>New York</td>
  <td>Paris</td>
  <td>A</td>
  <td>34</td>
  </tr>
  <tr>
  <td>Oslo</td>
  <td>London</td>
  <td>B</td>
  <td>42</td>
  </tr>
  <tr>
  <td>Oslo</td>
  <td>London</td>
  <td>A</td>
  <td>24</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>i need to have the percentage number of each type according to the routes.</p>
  <p>I don't know witch command to use to get a dataframe that looks like this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>xxx</th>
  <th>Paris</th>
  <th>Oslo</th>
  <th>London</th>
  <th>New York</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Paris</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>type A : 100%</td>
  </tr>
  <tr>
  <td>Oslo</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>type A : 36,3% type B : 63,6%</td>
  <td>NaN</td>
  </tr>
  <tr>
  <td>London</td>
  <td>NaN</td>
  <td>type A : 36,3% type B : 63,6%</td>
  <td>NaN</td>
  <td>NaN</td>
  </tr>
  <tr>
  <td>New York</td>
  <td>type A : 100%</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>NaN</td>
  </tr>
  </tbody>
  </table>
  </div>