Closed ValentinKaisermayer closed 4 years ago
It seems that the package is not compatible with IterableTables.
IterableTables
Both code segments work but the constructor for the TimeArray does only work in one specific case.
TimeArray
using Dates, TimeSeries, DataFrames, IterableTables dates = Date(2018, 1, 1):Day(1):Date(2018, 12, 31) df = DataFrame(time = dates, B = rand(length(dates))) TimeSeries.TimeArray(df, timestamp_column = :time)
using Dates, TimeSeries, DataFrames dates = Date(2018, 1, 1):Day(1):Date(2018, 12, 31) df = DataFrame(time = dates, B = rand(length(dates))) TimeSeries.TimeArray(df, timestamp = :time)
TimeSeries defines: https://github.com/JuliaStats/TimeSeries.jl/blob/a162268a8edf7a64ef57f874148897bf9ec6ec07/src/tables.jl#L60
TimeSeries
and IterableTables defines: function TimeSeries.TimeArray(x; timestamp_column::Symbol=:timestamp) https://github.com/queryverse/IterableTables.jl/blob/2683c006134613131c1f747c0f0fa40ec6e49bf0/src/integrations/timeseries.jl#L51
function TimeSeries.TimeArray(x; timestamp_column::Symbol=:timestamp)
You see there is some ambiguity.
Thanks!
Fixed in IterableTables
It seems that the package is not compatible with
IterableTables
.Both code segments work but the constructor for the
TimeArray
does only work in one specific case.TimeSeries
defines: https://github.com/JuliaStats/TimeSeries.jl/blob/a162268a8edf7a64ef57f874148897bf9ec6ec07/src/tables.jl#L60and
IterableTables
defines:function TimeSeries.TimeArray(x; timestamp_column::Symbol=:timestamp)
https://github.com/queryverse/IterableTables.jl/blob/2683c006134613131c1f747c0f0fa40ec6e49bf0/src/integrations/timeseries.jl#L51You see there is some ambiguity.
Thanks!