Group duplicate columns and sum the corresponding column values using pandas [duplicate]
问题 This question already has answers here : Pandas group-by and sum (6 answers) Closed last year . I am preprocessing apache server log data. I have 3 columns ID, TIME, and BYTES. Example: ID     TIME     BYTES 1     13:00     10 2     13:02     30 3     13:03     40 4     13:02     50 5     13:03     70 I want to achieve something like this: ID     TIME     BYTES 1     13:00