I have a DataFrame
object looking as follows:
| Row | timestamp | price | volume |
|-----|---------------------|-------|--------|
| 1 | 2011-08-14T14:14:40 | 10.40 | 0.779 |
| 2 | 2011-08-14T15:15:17 | 10.40 | 0.101 |
| 3 | 2011-08-14T15:15:17 | 10.40 | 0.316 |
| ... | ................... | ..... | ..... |
The timestamps
are non-unique, so I cannot convert to a TimeArray
before resolving this. How can I collapse duplicate timestamps
, taking the mean of the prices and the sum of the volumes?
Thank you for any pointers!