title: Cleaning data - Remove repeating sequences of 23 zeros and number from pandas dataframe
body: <p>I have a dataframe time series of wind speed data from large number of weather stations. Several stations contains repeating sequences of 23 zeros and a number e.g  </p>
  
  <pre><code>Station_code    4726631C    4726A602    4726C3E4
  Datetime            
  2015-03-01 00:00:00     0.0     0.0     0.0
  2015-03-01 01:00:00     0.0     0.0     0.0
  2015-03-01 02:00:00     0.0     0.0     0.0
  2015-03-01 03:00:00     0.0     0.0     0.0
  2015-03-01 04:00:00     0.0     0.0     0.0
  2015-03-01 05:00:00     0.0     0.0     0.0
  2015-03-01 06:00:00     0.0     0.0     0.0
  2015-03-01 07:00:00     NaN     0.0     0.0
  2015-03-01 08:00:00     0.0     0.0     0.0
  2015-03-01 09:00:00     0.0     0.0     0.0
  2015-03-01 10:00:00     0.0     0.0     0.0
  2015-03-01 11:00:00     0.0     0.0     0.0
  2015-03-01 12:00:00     2.4     2.7     1.9&lt;&lt;
  2015-03-01 13:00:00     0.0     0.0     0.0
  2015-03-01 14:00:00     0.0     0.0     0.0
  2015-03-01 15:00:00     0.0     0.0     0.0
  2015-03-01 16:00:00     0.0     0.0     0.0
  2015-03-01 17:00:00     0.0     0.0     0.0
  2015-03-01 18:00:00     0.0     0.0     0.0
  2015-03-01 19:00:00     0.0     0.0     0.0
  2015-03-01 20:00:00     0.0     0.0     0.0
  2015-03-01 21:00:00     0.0     0.0     0.0
  2015-03-01 22:00:00     NaN     0.0     0.0
  2015-03-01 23:00:00     0.0     0.0     NaN
  2015-03-02 00:00:00     0.0     0.0     0.0
  2015-03-02 01:00:00     0.0     0.0     0.0
  2015-03-02 02:00:00     0.0     0.0     0.0
  2015-03-02 03:00:00     0.0     0.0     0.0
  2015-03-02 04:00:00     0.0     0.0     0.0
  2015-03-02 05:00:00     0.0     0.0     0.0
  2015-03-02 06:00:00     0.0     0.0     0.0
  2015-03-02 07:00:00     0.0     0.0     0.0
  2015-03-02 08:00:00     0.0     0.0     0.0
  2015-03-02 09:00:00     0.0     0.0     0.0
  2015-03-02 10:00:00     0.0     0.0     0.0
  2015-03-02 11:00:00     0.0     0.0     0.0
  2015-03-02 12:00:00     2.4     2.7     1.9&lt;&lt;
  </code></pre>
  
  <p>To make things a bit more spicy, some of the zeros are NaNs, but usefully the number appears at hour = 12:00
  The repeating nature indicates it is erroneous data so needs to be removed.</p>
  
  <p>I was thinking something like:  </p>
  
  <pre><code>if data at df.index.hour = 12 is preceded by 23 values where np.nanmean = 0 then make all values in sequence = np.nan
  </code></pre>
  
  <p>But I am new to python and not sure how to translate this into a script.</p>
  
  <p>Thank you in advance :)</p>