title: How to fill voids (Nan) in Dataframe with mean values of that column?
body: <p>I have a dataframe with 4 columns: ch_name, time, values, and interval. I want to check if "interval" &lt; 300 secs check for NaN from "values" column. If there NAN values then fill NAN with mean of that column {'values'}.</p>
  
  <pre><code>[1798 rows x 2 columns]
                       value  interval
  time                                
  2019-09-26 00:02:00    0.0      60.0
  2019-09-26 00:03:00    0.0      60.0
  2019-09-26 00:04:00    0.0      60.0
  2019-09-26 00:05:00    0.0      60.0
  2019-09-26 00:06:00    0.0      60.0
  ...                    ...       ...
  2019-09-27 05:55:00    0.0      60.0
  2019-09-27 05:56:00    0.0      60.0
  2019-09-27 05:57:00    0.0      60.0
  2019-09-27 05:58:00    0.0      60.0
  2019-09-27 05:59:00    0.0      60.0
  
  [1798 rows x 2 columns]
                       value  interval
  time                                
  2019-09-26 00:02:00    1.0      60.0
  2019-09-26 00:03:00    1.0      60.0
  2019-09-26 00:04:00    1.0      60.0
  2019-09-26 00:05:00    1.0      60.0
  2019-09-26 00:06:00    1.0      60.0
  ...                    ...       ...
  2019-09-27 05:55:00    1.0      60.0
  2019-09-27 05:56:00    1.0      60.0
  2019-09-27 05:57:00    1.0      60.0
  2019-09-27 05:58:00    1.0      60.0
  2019-09-27 05:59:00    1.0      60.0
  </code></pre>