title: How do you convert 1 minute open-high-low-close data to another timeframe(fx: 5 minute, 1 hour) in Python?
body: <p>I'm pretty new to Python and StackOverflow so bear with me if I make mistakes in this post. </p>
  
  <p>I have a Pandas dataframe with 1 minute open, high, low, and close data, with time as the index, for a currency. How would I go about turning it into a dataframe with, for example, 5-minute open, high, low, close data, and make the timestamp fit too? Here is an example of the 1-minute data printed out:</p>
  
  <pre><code>                   ZARJPY_open  ZARJPY_high  ZARJPY_low  ZARJPY_close
  time                                                            
  201901011700        7.589        7.589       7.589         7.589
  201901011701        7.590        7.590       7.590         7.590
  201901011702        7.589        7.590       7.589         7.589
  201901011703        7.590        7.593       7.590         7.593
  201901011705        7.592        7.593       7.592         7.593
  </code></pre>
  
  <p>I would like to turn this into:</p>
  
  <pre><code>                  ZARJPY_open  ZARJPY_high  ZARJPY_low  ZARJPY_close
  time                                                            
  201901011700        7.589        7.593       7.589         7.593
  201901011706                  -next 5 minutes-                     
  </code></pre>
  
  <p>Any help is appreciated :)</p>
  
  <p>Edit: Time stamp is in YYYYMMDDHHmm (year, month, day, hour, minute) format</p>