title: How to get transformed dataframe by grouping by one column and matching on another in Pandas
body: <p>I have a Pandas dataframe like the following</p>
  <pre><code>col_a            col_b     col_c
  2021-05-01        1           30
  2021-05-01        3           40
  2021-05-01        2           60
  2021-05-02        1           70
  2021-05-02        2           10
  2021-05-02        3           20
  </code></pre>
  <p>And I want to make it into the following dataframe (i.e. adding <code>n</code> new columns based on how many different types in the <code>col_b</code> column in the original dataframe, and then matching based on <code>col_a</code> to fill in values)</p>
  <pre><code>col_a                 type_1   type_2     type_3
  2021-05-01                30      60        40   
  2021-05-02                70      10        20
  </code></pre>
  <p>Could you help me please?</p>