queryverse / IterableTables.jl

Implementations of the TableTraits.jl interface for various packages
Other
79 stars 9 forks source link

Cannot convert DataFrame to TimeArray in Julia 0.7 #83

Closed dldx closed 5 years ago

dldx commented 6 years ago

Hi!

I'm pretty new to Julia and I am trying to turn a DataFrame into a TimeArray. I managed to get this code working in Julia 0.6 but upon upgrading to 0.7, it doesn't work anymore...

using Dates
using DataFrames
using StatPlots
using TimeSeries
using IterableTables

.... more code .....

weather_ta = TimeArray(weather_df[[:date, :tmax_C, :tmin_C]], timestamp_column=:date)

MethodError: no method matching TimeArray(::DataFrame; timestamp_column=:date) Closest candidates are: TimeArray(!Matched::AbstractArray{D<:TimeType,1}, !Matched::AbstractArray{T,N}) where {T, N, D<:TimeType} at /home/durand/.julia/packages/TimeSeries/DyHME/src/timearray.jl:49 got unsupported keyword argument "timestamp_column" TimeArray(!Matched::AbstractArray{D<:TimeType,1}, !Matched::AbstractArray{T,N}, !Matched::Array{S<:AbstractString,1}) where {T, N, D<:TimeType, S<:AbstractString} at /home/durand/.julia/packages/TimeSeries/DyHME/src/timearray.jl:49 got unsupported keyword argument "timestamp_column" TimeArray(!Matched::AbstractArray{D<:TimeType,1}, !Matched::AbstractArray{T,N}, !Matched::Array{S<:AbstractString,1}, !Matched::Any; args...) where {T, N, D<:TimeType, S<:AbstractString} at /home/durand/.julia/packages/TimeSeries/DyHME/src/timearray.jl:49 ... Stacktrace: [1] top-level scope at none:0

I'm not sure if the issue is in this package or in the TimeSeries one but there was a very similar bug a year ago reported under #46 so perhaps this is related?

If you could point me in the right direction, I would appreciate it.

Thanks!

davidanthoff commented 6 years ago

As far as I can tell TimeSeries.jl is not yet 0.7/1.0 compatible, so I disabled the integration code until there is a release of TimeSeries.jl that works on 0.7/1.0.

dldx commented 6 years ago

Ah, that explains it. Thanks for the info!

vishaluk commented 5 years ago

Is this still the case that TimeSeries cant be used in 1.0 onwards?

davidanthoff commented 5 years ago

This should actually all work now!