title: Merge two different sized dataframes into one in python
body: <p>dataframe a:</p>
  <pre><code>   order_id  item_id description quantity value
  0  1         11      ball           50     100
  1  2         12      bat            25     50
  2  2         13      glove          75     150 
  3  3         11      ball           25     50
  4  3         13      glove          25     50
  5  4         12      bat            75     150
  6  5         12      bat            25     50
  7  5         11      ball           50     100
  </code></pre>
  <p>dataframe b:</p>
  <pre><code>  order_id  customer_id ordered   delivered
  0 1         123         14/03/20  18/03/20
  1 2         124         14/03/20  18/03/20
  2 3         125         15/03/20  19/03/20
  3 4         123         16/03/20  20/03/20
  4 5         125         17/03/20  21/03/20
  5 6         124         17/03/20  21/03/20
  </code></pre>
  <p>What I would like to do is combine the two so I have one table with the information in one place that is easy to analyse. I am confused by having multiple lines per order so not sure how best I can deal with that. Ideally I would have one line per order ID that showed the items ordered with total value.
  Perhaps something like:</p>
  <p>Output:</p>
  <pre><code>  order_id customer_id item_1 quan_1 item_2 quan_2 item_3 quan_3 value ordered delivered 
  0 1        123         11     50     nan    nan    nan    nan    100   14/03/20  18/03/20
  1 2        124         12     25     13     75     nan    nan    200   14/03/20  18/03/20
  </code></pre>
  <p>etc.....</p>