I'm having this data frame:
Name Date Quantity
Apple 07/11/17 20
orange 07/14/17 20
Apple 07/14/17 70
Orange 07/25/17 40
Apple 07/20/17 30
I want to aggregate this by Name
and Date
to get sum of quantities
Details:
Date: Group, the result should be at the beginning of the week (or just on Monday)
Quantity: Sum, if two or more records have same Name and Date (if falls on same interval)
The desired output is given below:
Name Date Quantity
Apple 07/10/17 90
orange 07/10/17 20
Apple 07/17/17 30
orange 07/24/17 40
Thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…