I have the following dataframe:
How do I offset Pandas dayofyear so start date is 1st October not 1st January
In this case, I want the year to be from 1st October to 30th Sep, and it would need to take into account leap years.
Below is an example of how I want the output, with the day of the year column the only variable.
here is the dataframe in table form:
Day stock dayofyear weekday month year leapyear
0 24/09/2019 10 267 1 9 2019 False
1 25/09/2019 10 268 2 9 2019 False
2 26/09/2019 11 269 3 9 2019 False
3 27/09/2019 12 270 4 9 2019 False
4 28/09/2019 14 271 5 9 2019 False
5 29/09/2019 14 272 6 9 2019 False
6 30/09/2019 15 273 0 9 2019 False
7 01/10/2019 16 274 1 10 2019 False
8 02/10/2019 17 275 2 10 2019 False
9 03/10/2019 18 276 3 10 2019 False
10 04/10/2019 19 277 4 10 2019 False

