ohlc_dict = {'Open': 'first', 'High': 'max', 'Low': 'min', 'Close': 'last',
    'Volume': 'sum'}
df.resample('5T', how=ohlc_dict, closed='left', label='left')
Converting OHLC stock data into a different timeframe with python and pandas