JuliaStats / TimeSeries.jl

Time series toolkit for Julia
Other
352 stars 69 forks source link

Implement TimeSpan representation and PeriodIndex #470

Open mkschulze opened 3 years ago

mkschulze commented 3 years ago

A Period represents a span of time (e.g., a day, a month, a quarter, etc). You can specify the span via freq keyword using a frequency alias like below.

PeriodIndex(['2011-01', '2011-02', '2011-03', '2011-04', '2011-05', '2011-06', '2011-07', '2011-08', '2011-09', '2011-10', '2011-11', '2011-12', '2012-01'], dtype='period[M]', freq='M')

Basically this functionality from Pandas: https://pandas.pydata.org/docs/user_guide/timeseries.html#time-span-representation

strickek commented 3 years ago

Is it possible to use Dates TimePeriod for this? E.g. Month(1) or Minutes(15).

mkschulze commented 3 years ago

no idea

femtotrader commented 3 years ago

Maybe you should have a look at the projects I wrote some years ago https://github.com/femtotrader/TimeFrames.jl/ https://github.com/femtotrader/TimeSeriesResampler.jl

(but which are currently unmaintained)