i have a df that has this:
| ID | Date | Amount |
|---|---|---|
| 1234 | 1/2/23 | 12 |
| 5678 | 1/2/23 | 34 |
| 5678 | 1/2/23 | 56 |
| 9012 | 1/2/23 | 70 |
I am trying to get the sum of 'Amount' and the count of 'Date':
| ID | Count(Date) | Sum(Amount) |
|---|---|---|
| 1234 | 1 | 12 |
| 5678 | 2 | 90 |
| 9012 | 1 | 70 |
I have tried varies groupby's, agg's, and similar but can't seem to figure it out.
How do I do this?