How to create a pandas DatetimeIndex with year as frequency?
Annual indexing to the beginning or end of the year Frequency is freq=’A’ for end of year frequency, ‘AS’ for start of year. Check the aliases in the documentation. eg. pd.date_range(start=pd.datetime(2000, 1, 1), periods=4, freq=’A’) returns DatetimeIndex([‘2000-12-31’, ‘2001-12-31’, ‘2002-12-31’, ‘2003-12-31′], dtype=”datetime64[ns]”, freq=’A-DEC’, tz=None) Annual indexing to the beginning of an arbitrary month If you need … Read more