title: Split nested array values from Pandas Dataframe cell over multiple rows
body: <p>I have a <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html" rel="noreferrer">Pandas DataFrame</a> of the following form</p>
  
  <p><a href="https://i.stack.imgur.com/xZyo5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xZyo5.png" alt="enter image description here"></a></p>
  
  <p>There is one row per ID per year (2008 - 2015). For the columns <code>Max Temp</code>, <code>Min Temp</code>, and <code>Rain</code> each cell contains an array of values corresponding to a day in that year, i.e. for the frame above </p>
  
  <ul>
  <li><code>frame3.iloc[0]['Max Temp'][0]</code> is the value for January 1st 2011</li>
  <li><code>frame3.iloc[0]['Max Temp'][364]</code> is the value for December 31st 2011.</li>
  </ul>
  
  <p>I'm aware this is badly structured, but this is the data I have to deal with. It is stored in MongoDB in this way (where one of these rows equates to a document in Mongo). </p>
  
  <p>I want to split these nested arrays, so that instead of one row per ID per year, I have one row per ID per day. While splitting the array, however, I would also like to create a new column to capture the day of the year, based on the current array index. I would then use this day, plus the <code>Year</code> column to create a <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DatetimeIndex.html" rel="noreferrer">DatetimeIndex</a></p>
  
  <p><a href="https://i.stack.imgur.com/kwSZ5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kwSZ5.png" alt="enter image description here"></a></p>
  
  <p>I searched here for relevant answers, but only found <a href="https://stackoverflow.com/questions/35166359/how-to-unnest-cells-in-a-dataframe-employing-pandas-and-python">this one</a> which doesn't really help me.</p>