I need a list of date ranges in which each element is a string of the format 'yyyymmdd'
, for example: ['20130226','20130227','20130228','20130301','20130302']
.
I can use pandas for this:
>>> pandas.date_range('20130226','20130302') <class 'pandas.tseries.index.DatetimeIndex'> [2013-02-26 00:00:00, ..., 2013-03-02 00:00:00] Length: 5, Freq: D, Timezone: None
But this is DatetimeIndex, and I need to do some additional format conversion, and how to do it in a neat way?
source share