Given is the following dataframe:
name item price timestamp
______________________________________
Elliot a 10 12312
Sara b 20 45654
Elliot a 30 15000
Tom a 5 43423
Elliot, for example, consumed item 'a' twice, and now I want to aggregate over all such cases such that in the end I have only a single occurrence of 'name-item' pair, but such that the 'price' is summed and the 'timestamp' corresponds to the minimum found:
name item price timestamp
______________________________________
Elliot a 40 12312
Sara b 20 45654
Tom a 5 43423
How can this be done efficiently?