title: Exploding pandas dataframe by list to multiple rows with a new column for multiindex
body: <p>I have a Pandas dataframe where the columns are 'month' and 'year', and a 'value_list' which is a list of values - one for each day of the month. Something like this -</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">year</th>
  <th style="text-align: left;">month</th>
  <th style="text-align: right;">value_list</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: left;">2</td>
  <td style="text-align: right;">[10, 20, 30, 40, ...... 290, 300]</td>
  </tr>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: left;">3</td>
  <td style="text-align: right;">[110, 120, 130, 140, ...... 390, 400]</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to unpack these into multiple rows - one for each day (new column), so that I get something like the following -</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">year</th>
  <th style="text-align: left;">month</th>
  <th style="text-align: left;">day</th>
  <th style="text-align: right;">value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: left;">2</td>
  <td style="text-align: left;">1</td>
  <td style="text-align: right;">10</td>
  </tr>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: left;">2</td>
  <td style="text-align: left;">2</td>
  <td style="text-align: right;">20</td>
  </tr>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: left;">2</td>
  <td style="text-align: left;">3</td>
  <td style="text-align: right;">30</td>
  </tr>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: left;">2</td>
  <td style="text-align: left;">4</td>
  <td style="text-align: right;">40</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and so on.</p>
  <p>I tried using <code>df.explode()</code> but to no avail since the index gets reset or is set to a new single index. How can I automatically get the dates (essentially creating a year, month, date multiindex) while unpacking the lists?</p>