title: Fill in missing dates in dataframe using the mean
body: <p>I have dates that I'm pulling into a dataframe at regular intervals.
  The data is generally well-formed, but sometimes there are bad data in an otherwise date column. </p>
  
  <p>I would always expect to have a date in the parsed 9 digit form:</p>
  
  <pre><code>(tm_year=2000, tm_mon=11, tm_mday=30, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=335, tm_isdst=-1)
  (2015, 12, 29, 0, 30, 50, 1, 363, 0)
  </code></pre>
  
  <p>How should I check and fix this? </p>
  
  <p>What I would like to do is replace whatever is not a date, with a date based on a variable that represents the last_update + 1/2 the update interval, so the items are not filtered out by later functions. </p>
  
  <p>Data as shown is published_parsed from feedparser.</p>
  
  <pre><code>import pandas as pd
  import datetime
  
  # date with ugly data
  df_date_ugly = pd.DataFrame({'date': [
                               (2015, 12, 29, 0, 30, 50, 1, 363, 0), 
                               (2015, 12, 28, 23, 59, 12, 0, 362, 0),
                              'None', '',
                               (2015, 12, 28, 23, 59, 12, 0, 362, 0)
                              ]})
  
  # date is fine
  df_date =  pd.DataFrame({'date': [
                               (2015, 12, 29, 0, 30, 50, 1, 363, 0), 
                               (2015, 12, 28, 23, 59, 12, 0, 362, 0),
                               (2015, 12, 28, 23, 59, 12, 0, 362, 0)
                              ]})
  
  Pseudocode
    if the original_date is valid
       return original_date
    else
       return substitute_date
  </code></pre>