I have a column of dates that I split into 2 columns of dates, DATE_1
and DATE_2
. I have been attempting to find a way to get the week number of year of each date and the day of the week for each date within that range, exclusive of DATE_2
For example:
Date_1 Date_2
2020-09-27 2020-10-01
2020-12-24 2020-12-29
2020-12-24 2021-01-03
2020-12-28 2021-01-03
and I want to get
Date_1 Date_2 Week Days
2020-09-27 2020-10-01 39,40,40,40 Sun,Mon,Tues,Wed
2020-12-24 2020-12-29 52,52,52,53 Thurs,Fri,Sat,Sun,Mon
2020-12-24 2021-01-03 52,52,52,53,53,53,53,53,53 Thurs,Fri,Sat,Sun,Mon,Tues,Wed,Thur,Fri,Sat
2020-12-28 2021-01-03 53,53,53,53,53,53 Mon,Tues,Wed,Thur,Fri,Sat
The way the days display can be full names or numeric values that correspond to certain days, the most important thing is that the data exists somewhere.
I know that pandas has date_range but I couldn't figure out how to incorporate that into what I am looking for. Maybe it isn't pandas specific I am not really sure. Any help would be appreciated.