From ce4d3d643fef7053c5c730639317448159aab5d1 Mon Sep 17 00:00:00 2001 From: siddjain444 Date: Wed, 20 Mar 2024 11:38:26 +0000 Subject: [PATCH] Updating subset.jl to make it compatible with the Julia version 1.6 --- src/subset.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subset.jl b/src/subset.jl index 6335582..fdce095 100644 --- a/src/subset.jl +++ b/src/subset.jl @@ -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