I have a dataframe with datetimes but would like to convert it to week dates. These week conversion should align with the pd.grouper(freq='W')
format. How can I do this?
date | week_date
2022-03-10 | 2022-03-06
2022-03-15 | 2022-03-13
2022-03-21 | 2022-03-20
When you use pd.grouper(freq='W'), these results of how weeks are formatted is in the week_date column above. How do I get this formatting without using grouper just by a random date of a user?