in the dataframe below, the 'end_of_week' column does not yet exist. I'm trying to make so that if 'date' is lesser or equal to Thursday of that week, 'end_of_week' is Thursday. How do I do this?
What I'm trying to do:
df['end_of_week'] = Thursday of same week if df['date'] <= Thursday
Example:
0 date end_of_week
1 2015-08-31 2015-09-03 #if <= Thursday of that week
2 2015-09-01 2015-09-03
3 2015-09-07 2015-09-10
4 2015-09-09 2015-09-10
5 2015-09-16 2015-09-17
6 2015-09-17 2015-09-17
Thanks.