title: Pandas groupby then fill missing rows
body: <p>I have a dataframe structured like this:</p>
  <p>df_all:</p>
  <pre><code>      day_time            LCLid       energy(kWh/hh)
  2014-02-08 23:00:00     MAC000006         0.077
  2014-02-08 23:30:00     MAC000006         0.079
          ...
  2014-02-08 23:00:00     MAC000007         0.045
          ...
  </code></pre>
  <p>There are four sequential datetimes (accross all LCLid's) missing from the data that I want to fill with previous and trailing values.</p>
  <p>If the dataframe was split into sub-dataframes (df), one per LCLid eg as per:</p>
  <pre><code>gb = df.groupby('LCLid')    
  df_list = [gb.get_group(x) for x in gb.groups]
  </code></pre>
  <p>Then I could do this for each df in df_list:</p>
  <pre><code>#valid data before gap
  prev_row = df.loc['2013-09-09 22:30:00'].copy()
  #valid data after gap
  post_row = df.loc['2013-09-10 01:00:00'].copy()
  df.loc[pd.to_datetime('2013-09-09 23:00:00')] = prev_row
  df.loc[pd.to_datetime('2013-09-09 23:30:00')] = prev_row
  df.loc[pd.to_datetime('2013-09-10 00:00:00')] = post_row
  df.loc[pd.to_datetime('2013-09-10 00:30:00')] = post_row
  
  df = df.sort_index()
  </code></pre>
  <p>How can I do this on the df_all one one go to fill the missing data with 'valid' data just from each LCLid?</p>