title: How to get new pandas dataframe with max value of k consecutive rows?
body: <p>I have this pandas dataframe:</p>
  <pre><code>ts = pd.Series([2372, 4356, 3034, 1502, 676, 4187, 2634, 1002])
  </code></pre>
  <p>What I would like to get is a dataframe which exists of the max value of four consecutive rows of the column and keeps index of row 0, 4, 8 etc.</p>
  <p>In this case, this means a new dataframe should look like this one:</p>
  <pre><code>0 4356 
  
  4 4187
  </code></pre>
  <p>How could I do this?</p>