'Python-separate weekly date range from Sunday to next week Saturday
I am working on data cleaning with a data frame in Python, there is one column named datetime, I need to separate this column datetime to each week by range from Sunday to next week Saturday in python.
I cannot use: df['Week_Number_closed'] = pd.to_datetime(df['close_date']).dt.strftime('%W') Because this code separate each week by range from Monday to Sunday, but I need to separate each week by range Sunday to next week Saturday, how to solve this problem, thank you so much. The best idea is separating each week by first start date of Sunday
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
