title: How can I fill missing value with mean of dayofweek and hour data
body: <p>I have some questions about how to fill data with multiindex</p>
  <p>I have the example of data like this</p>
  <pre><code>df :
  
  | ind_Dayofweek | ind_Hour | ind_Min |   Date            |load(kW)|
  |---------------|----------|---------|-------------------|--------| 
  |      0        |    0     |    0    |1/1/2020 00.00.00  |    2   |
  |               |          |    1    |1/1/2020 00.01.00  |    1   |
  |               |          |    .    |         .         |    .   |
  |               |          |    .    |         .         |    .   |
  |               |    1     |    0    |1/1/2020 00.01.00  |   Nan  |
  |      .        |    .     |    .    |         .         |    .   |
  |      .        |    .     |    .    |         .         |    .   |
  |      .        |    .     |    .    |         .         |    .   |
  |      5        |    23    |    59   |31/12/2020 23.59.00|   Nan  |
  </code></pre>
  <p>and also have table grouped by mean of multiindex and drop the date column</p>
  <pre><code>df_grouped_by_ind_mean :
  
      | ind_Dayofweek | ind_Hour | ind_Min |load(kW)|
      |---------------|----------|---------|--------| 
      |      0        |    0     |    0    |    1   |
      |               |          |    1    |    3   |
      |               |          |    .    |    .   |
      |               |          |    .    |    .   |
      |               |    1     |    0    |    4   |
      |      .        |    .     |    .    |    .   |
      |      .        |    .     |    .    |    .   |
      |      .        |    .     |    .    |    .   |
      |      6        |    23    |    59   |    1   |
  </code></pre>
  <p>(To make it clear, the missing data in <code>df</code> is just an example. There are more missing in my data.)</p>
  <p>Multiindex of the data, which is computed by the date column, can be shown as below:</p>
  <p><code>ind_Dayofweek</code> is in range of [0-6]</p>
  <p><code>ind_Hour</code>  is in range of [0-23]</p>
  <p><code>ind_Min</code>  is in range of [0-59]</p>
  <p>The data is around 1/1/2020 00.00.00 - 31/12/2020 23.59.00</p>
  <p>I want to fill missing load values in <code>df</code> with matching multiindex in <code>df_grouped_by_ind_mean</code>.</p>
  <p>For example : 31/12/2020 23.59.00 load data may be filled with mean of data which [dayofweek,hour,min]  = [5,23,59]</p>
  <p>I already use</p>
  <pre><code>  df_grouped_by_ind_mean = df.groupby([df.ind_Dayofweek, df.ind_Hour, df.ind_Min]).mean()
    df = df.fillna(df_grouped_by_ind_mean)
  </code></pre>
  <p>but it doesn't works.</p>
  <p>How can I do that?</p>
  <p>Thank you</p>