Apr-21-2019, 11:55 PM
Hi everyone,
I have been trawling through the pandas documentation trying to figure out how to set my index dates to the beginning of each month for each quarter (the quarters are not standard quarterly months), first date is 1990-03-01 next is 1990-06-01 etc. The closest I have got is this code below, but it sets the day to end of each month.
Any help is appreciated.
Thanks
I have been trawling through the pandas documentation trying to figure out how to set my index dates to the beginning of each month for each quarter (the quarters are not standard quarterly months), first date is 1990-03-01 next is 1990-06-01 etc. The closest I have got is this code below, but it sets the day to end of each month.
1 2 |
dates = pd.date_range(start = '1990-03' , freq = 'Q' , periods = len (df_gdp.columns)) dates |
Thanks