title: Interpolate only short gaps in pandas dataframe with DateTimeIndex
body: <p>I am looking fopr a way to interpolate only over short gaps in a Pandas DataFrame that has a DateTimeIndex. Long gaps should be kept as they are.</p>
  <pre><code>df = pd.DataFrame(
      { &quot;value&quot;: [ 1, np.nan, 3, np.nan, np.nan, 5, np.nan, 11, np.nan, 21, np.nan, 41 ] },
      index=pd.to_datetime( [ 
          &quot;2021-01-01 00:00&quot;, &quot;2021-01-01 00:05&quot;, &quot;2021-01-01 00:10&quot;,
          &quot;2021-01-01 00:11&quot;, &quot;2021-01-01 00:13&quot;, &quot;2021-01-01 00:14&quot;,
          &quot;2021-01-01 00:15&quot;, &quot;2021-01-01 01:30&quot;, &quot;2021-01-01 03:00&quot;,
          &quot;2021-01-01 04:00&quot;, &quot;2021-01-01 05:45&quot;, &quot;2021-01-01 06:45&quot;,
      ] )
  )
  </code></pre>
  <pre><code>                     value
  2021-01-01 00:00:00    1.0
  2021-01-01 00:05:00    NaN
  2021-01-01 00:10:00    3.0
  2021-01-01 00:11:00    NaN
  2021-01-01 00:13:00    NaN
  2021-01-01 00:14:00    5.0
  2021-01-01 00:15:00    NaN
  2021-01-01 01:30:00   11.0
  2021-01-01 03:00:00    NaN
  2021-01-01 04:00:00   21.0
  2021-01-01 05:45:00    NaN
  2021-01-01 06:45:00   41.0
  </code></pre>
  <p>The idea is to keep gaps that are longer than a certain time (&gt;5 minutes in this case), but interpolate all missing values within shorter gaps.</p>
  <p><code>interpolate()</code> has a <code>limit</code> argument that limits the number of missing values to be interpolated, but this does not respect the time delta between the rows, only the number of rows.</p>
  <p>I would like the result to be like this:</p>
  <pre><code>                         value
  2021-01-01 00:00:00   1.000000
  2021-01-01 00:05:00   2.000000
  2021-01-01 00:10:00   3.000000
  2021-01-01 00:11:00   3.500000
  2021-01-01 00:13:00   4.500000
  2021-01-01 00:14:00   5.000000
  2021-01-01 00:15:00        NaN
  2021-01-01 01:30:00  11.000000
  2021-01-01 03:00:00        NaN
  2021-01-01 04:00:00  21.000000
  2021-01-01 05:45:00        NaN
  2021-01-01 06:45:00  41.000000
  </code></pre>