TimeSeriesIO
November 12, 2016 ยท View on GitHub
A Julia library to convert DataFrame to TimeSeries (and otherwise).
Install
julia> Pkg.add("TimeSeriesIO")
Usage
julia> using TimeSeriesIO
Convert DataFrame (from DataFrames.jl) to TimeArray (from TimeSeries.jl)
julia> ta = TimeArray(df, colnames=[:Open, :High, :Low, :Close], timestamp=:Date)
Converts a DataFrame named df to a TimeArray named ta keeping only columns defined using colnames and using colums defined using timestamp as timeseries index.
Optional parameters
colnames: If it's not given, all columns will be kept.timestamp: If it's not given, column named:Datewill be used as timeseries timestamp index.
Convert TimeArray (from TimeSeries.jl) to DataFrame (from DataFrames.jl)
df = DataFrame(ta, colnames=[:Open, :High, :Low, :Close], timestamp=:Date)
Converts a TimeArray named ta to a DataFrame named df keeping only columns defined using colnames.
Optional parameters
colnames: If it's not given, all columns will be kept.timestamp: If it's not given, column named:Datewill be created.