0

In a Pandas Series there are multiple rows with the same date. I want to sum the values in those rows and join them into a single row, like below:

dates                                 dates                         
2019-01-03    1                       2019-01-03    1
2019-01-04    2                       2019-01-04    9
2019-01-04    3                       2019-01-08   -11
2019-01-04    4       ------->        2019-01-09   -6
2019-01-08   -5
2019-01-08   -6
2019-01-09   -6

Note! In the example above, there are 3 rows with the same date "2019-01-04", and two rows with "2019-01-08". Each has been collapsed to a single row, with their sum.

How can I achieve this?

0 Answers0