title: pandas ffill/bfill for specific amount of observation
body: <p>I have the following dataframe: </p>
  
  <pre><code> id     indicator 
   1          NaN
   1          NaN
   1          1
   1          NaN
   1          NaN
   1          NaN
  </code></pre>
  
  <p>In reality, I have several more ids. My question now is, how do I do a forward or backward fill for a specific range, e.g. for only the next/last 2 observations. My dataframe should look like this: </p>
  
  <pre><code> id     indicator 
   1          NaN
   1          NaN 
   1          1
   1          1
   1          1
   1          NaN
  </code></pre>
  
  <p>I know the command  </p>
  
  <pre><code>df.groupby("id")["indicator"].fillna(value=None, method="ffill")         
  </code></pre>
  
  <p>However, this fills all the missing values instead of just the next two observations. Anyone knows a solution?</p>