Currently date_range accepts string flags for freq=
.
dateutil (which is already a pandas dependency) has constants for YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY
which are used in the dateutil equivalent of date_range, rrule
.
it would be a nice feature if these were accepted as well as the string arguments
Comment From: jcontesti
I start to prepare a PR for this enhancement.
Comment From: jorisvandenbossche
@mangecoeur since those constants are actually just ints, that means we would effectively also accept ints (of the appropriate range). I am not sure we should do that.
Do you have a good use case for this?
Comment From: mangecoeur
@jorisvandenbossche mainly for consistency between using dateutil directly and using it via pandas. I don't think them being ints under the hood is such a big issue (although maybe one day everything will use proper Enums). Anyway, as far as i'm concerned its a nice to have.
Comment From: fpunny
take
Comment From: MarcoGorelli
closing due to lack of interest/activity, but thanks for the suggestion!