Skip to content

Commit 76feaf4

Browse files
committed
fix ambiguity problem in filter/!
1 parent 820f916 commit 76feaf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dataset/other.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ julia> filter(ds, 2:3, type = isless, with = :x)
10381038
3 │ 5 2.0 true
10391039
```
10401040
"""
1041-
function Base.filter(ds::AbstractDataset, cols::Union{ColumnIndex, MultiColumnIndex}; view = false, type= all, kwargs...)
1041+
function Base.filter(ds::AbstractDataset, cols::Union{Vector{T}, ColumnIndex, MultiColumnIndex}; view = false, type= all, kwargs...) where T <: Union{<:Integer, Symbol, AbstractString}
10421042
if view
10431043
Base.view(ds, byrow(ds, type, cols; kwargs...), :)
10441044
else
@@ -1058,7 +1058,7 @@ Refer to [`filter`](@ref) for exmaples.
10581058
10591059
See [`byrow`](@ref), [`filter`](@ref), [`delete!`](@ref), [`delete`](@ref)
10601060
"""
1061-
Base.filter!(ds::Dataset, cols::Union{ColumnIndex, MultiColumnIndex}; type = all, kwargs...) = deleteat!(ds, .!byrow(ds, type, cols; kwargs...))
1061+
Base.filter!(ds::Dataset, cols::Union{Vector{T}, ColumnIndex, MultiColumnIndex}; type = all, kwargs...) = deleteat!(ds, .!byrow(ds, type, cols; kwargs...)) where T <: Union{<:Integer, Symbol, AbstractString}
10621062

10631063
# filter out `true`s
10641064
"""

0 commit comments

Comments
 (0)