A Julia library to convert DataFrame to TimeSeries (and otherwise).
julia> Pkg.add("TimeSeriesIO")
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.
colnames
: If it's not given, all columns will be kept.timestamp
: If it's not given, column named:Date
will 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
.
colnames
: If it's not given, all columns will be kept.timestamp
: If it's not given, column named:Date
will be created.