-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
date_range should take timedelta as freq #6307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think passing a timedelta as freq can only make sense for timeframe below 1 month but it would still be very useful. Maybe an idea could be to provide a way to build a DateOffset from a timedelta |
Agree, re making an offset. A from_timedelta method would make sense. |
I think u could directly interpret a time delta as a passed freq |
I changed the pd.tseries.frequencies.to_offset to accept timedeltas in the PR. It lazily forces it to Nano/Micro, could be more clever... |
hmm these should try to upcast these (eg return seconds, minutes, days etc if possible |
This works in 0.21.1
This can probably be closed. |
yes this is well tested @jschendel did a PR. awhile back on this iirc |
http://stackoverflow.com/questions/21643407/define-a-pandas-tseries-index-datetimeindex-using-2-datetimes-dt-start-and-dt-s/21651263#21651263
The text was updated successfully, but these errors were encountered: