Skip to content

Commit

Permalink
Merge pull request #177 from siddjain444/i162_julia_version
Browse files Browse the repository at this point in the history
Updating subset.jl to make it compatible with the Julia version 1.6
  • Loading branch information
chiraganand authored Mar 20, 2024
2 parents b358263 + ce4d3d6 commit 8b6bafc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/subset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ julia> subset(ts,Date("2022-9-27"),:)
"""
function subset(ts::TSFrame, from::T, to::T) where {T<:Union{Int, TimeType}}
TSFrame(DataFrames.subset(ts.coredata, :Index => x -> x .>= from .&& x .<= to))
TSFrame(DataFrames.subset(ts.coredata, :Index => x -> from .<= x .<= to))
end


function subset(ts::TSFrame, ::Colon, to::T) where {T<:Union{Int, TimeType}}
TSFrame(DataFrames.subset(ts.coredata, :Index => x -> x .<= to))
end
Expand Down

0 comments on commit 8b6bafc

Please sign in to comment.