We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JuliaStats/TimeSeries.jl#264 JuliaLang/julia#18024
TimeFrame could be supported and we could define a range with not regularly spaced events
Example:
In [1]: import pandas as pd In [2]: from pandas.tseries.frequencies import to_offset In [3]: from pandas.tseries.offsets import MonthEnd In [2]: pd.date_range("2010-01-01", "2020-01-01", freq="MS") Out[2]: DatetimeIndex(['2010-01-01', '2010-02-01', '2010-03-01', '2010-04-01', '2010-05-01', '2010-06-01', '2010-07-01', '2010-08-01', '2010-09-01', '2010-10-01', ... '2019-04-01', '2019-05-01', '2019-06-01', '2019-07-01', '2019-08-01', '2019-09-01', '2019-10-01', '2019-11-01', '2019-12-01', '2020-01-01'], dtype='datetime64[ns]', length=121, freq='MS') In [3]: pd.date_range("2010-01-01", "2020-01-01", freq="M") Out[3]: DatetimeIndex(['2010-01-31', '2010-02-28', '2010-03-31', '2010-04-30', '2010-05-31', '2010-06-30', '2010-07-31', '2010-08-31', '2010-09-30', '2010-10-31', ... '2019-03-31', '2019-04-30', '2019-05-31', '2019-06-30', '2019-07-31', '2019-08-31', '2019-09-30', '2019-10-31', '2019-11-30', '2019-12-31'], dtype='datetime64[ns]', length=120, freq='M') In [4]: pd.date_range("2010-01-01 20:00:00", "2010-01-04 00:00:00", freq="D") Out[4]: DatetimeIndex(['2010-01-01 20:00:00', '2010-01-02 20:00:00', '2010-01-03 20:00:00'], dtype='datetime64[ns]', freq='D') In [5]: pd.date_range("2010-01-01", "2010-01-04", freq="D") Out[5]: DatetimeIndex(['2010-01-01', '2010-01-02', '2010-01-03', '2010-01-04'], dtype='datetime64[ns]', freq='D')
The text was updated successfully, but these errors were encountered:
aa8d38f
julia> collect(range(DateTime(2010, 1, 1, 20), TimeFrame("D"), DateTime(2010, 1, 4))) 3-element Array{DateTime,1}: 2010-01-01T00:00:00 2010-01-02T00:00:00 2010-01-03T00:00:00
seems correct
but
julia> collect(range(Date(2010, 1, 1), Monthly(boundary=Begin), Date(2020, 1, 1))) 120-element Array{Date,1}: 2010-01-01 2010-02-01 2010-03-01 ⋮ 2019-10-01 2019-11-01 2019-12-01
2020-01-01 is missing
2020-01-01
We need also to compare collect(range(Date(2010, 1, 1), Monthly(boundary=End), Date(2020, 1, 1)))
collect(range(Date(2010, 1, 1), Monthly(boundary=End), Date(2020, 1, 1)))
Sorry, something went wrong.
No branches or pull requests
JuliaStats/TimeSeries.jl#264
JuliaLang/julia#18024
TimeFrame could be supported
and we could define a range with not regularly spaced events
Example:
The text was updated successfully, but these errors were encountered: