title: Date interval average Python pandas
body: <p>This is my dataframe:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID number</th>
  <th>Date purchase</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>2022-05-01</td>
  </tr>
  <tr>
  <td>1</td>
  <td>2021-03-03</td>
  </tr>
  <tr>
  <td>1</td>
  <td>2020-01-03</td>
  </tr>
  <tr>
  <td>2</td>
  <td>2019-01-03</td>
  </tr>
  <tr>
  <td>2</td>
  <td>2018-01-03</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to get a horizontal dataframe with alle the dates in seperate columns per ID number.</p>
  <p>So like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID number</th>
  <th>Date 1</th>
  <th>Date 2</th>
  <th>Date 3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>2022-05-01</td>
  <td>2021-03-03</td>
  <td>2020-01-03</td>
  </tr>
  <tr>
  <td>2</td>
  <td>2019-01-03</td>
  <td>2018-01-03</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>After I did this I want to calculate the difference between these dates.</p>