df = pd.DataFrame(np.random.randn(100, 2), columns=['A', 'B'], index=pd.
    date_range('2015-01-01 00:00:00', periods=100, freq='8H'))
How to resample a df with datetime index to exactly n equally sized periods?