Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with dates
#1
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.

dates = pd.date_range(start='1990-03', freq='Q', periods=len(df_gdp.columns))
dates
Any help is appreciated.

Thanks
Reply


Messages In This Thread
Working with dates - by Scott - Apr-21-2019, 11:55 PM
RE: Working with dates - by Larz60+ - Apr-22-2019, 12:20 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020