Okay, so I believe this is a simple problem, however I haven't seen a straighfoward solution that reflects my desired output.
Here is my dataframe:
day | week_number | percent
Monday | 1 | 15.3
Tuesday | 1 | 10.0
Friday | 1 | 5.2
Monday | 2 | 7.0
Thursday| 2 | 13.0
Below is my desired dataframe. I need to know: best solution to get desired outcome.
DESIRED OUTPUT:
day | week_number | percent|week_avg
Monday | 1 | 15.30 | 10.17
Tuesday | 1 | 10.00 | 10.17
Friday | 1 | 5.20 | 10.17
Monday | 2 | 7.00 | 10.00
Thursday| 2 | 13.00 | 10.00
Many thanks in advance!