I doing code about dataframe in python. I successfully group the timestamp with seconds like below, but I don't know how to group the timestamp with minutes.
Price
timestamp
2018-06-01 00:00:00.155449 13530.909091
2018-06-01 00:00:01.155449 13530.909091
2018-06-01 00:00:02.155451 13530.909091
2018-06-01 00:00:03.155452 13530.909091
2018-06-01 00:00:04.155453 13530.909091
... ...
2018-06-01 23:59:55.735402 13285.000000
2018-06-01 23:59:56.894110 13285.000000
2018-06-01 23:59:57.894110 13285.000000
2018-06-01 23:59:58.894110 13285.000000
2018-06-01 23:59:59.894110 13285.000000
I use groupby method kind like this sell_price = sell.groupby('timestamp').price.mean()
How can I group this timestamp every minutes?
my expected result:
timestamp price
2018-06-01 00:01:00.155449 13530.909091
2018-06-01 00:02:00.155449 13530.909091
2018-06-01 00:03:00.155451 13530.909091
2018-06-01 00:04:00.155452 13530.909091
2018-06-01 00:05:00.155453 13530.909091
... ...
2018-06-01 23:55:00.735402 13285.000000
2018-06-01 23:56:00.894110 13285.000000
2018-06-01 23:57:00.894110 13285.000000
2018-06-01 23:58:00.894110 13285.000000
2018-06-01 23:59:00.894110 13285.000000