I am working on a dataFrame with multiple years of data with a timestamp for each value. I am struggling with sorting data for summer/non-summer months. I am not sure how to tell pandas to get the data with dates June 15 to September 15, however discarding the year.
df['is_summer'] = df['Date'].dt.month.between(6,9) # This works for June 1 to September 30 for every year
# I want to do this, this is pseudo code
df['is_summer'] = df['Date'].dt.day.between(6-15,9-15) # From June 15 to September 15 for every year
# I also want to this
df['is_late_night'] = df['Date'].dt.time.between(20:00,23:59) # From 20:00 to 23:59 for every day
I am having a difficult time finding the documentation for this. I want to know the correct syntax for the .between() for time, month, day, and year. Thank you for the help