Indexing the TimeArray objects

The TimeSeries library exposes a powerful API for accessing information structured as TimeArray data. We have already seen that we can access individual columns by indexing by column name:

julia> MarketData.ohlc[:High] 
500×1 TimeArray{Float64,1,Date,Array{Float64,1}} 2000-01-03 to 2001-12-31 

It results in this:

We can even use a combination of columns:

julia> MarketData.ohlc[:High, :Low] 

The output is as follows:

We can also index into the array using row IDs and dates/times (corresponding to the timestamp

Get Julia Programming Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.