Skip to content

Commit

Permalink
Update src/abstractdataframe/sort.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins committed Oct 28, 2020
1 parent f57184f commit 93c4512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/abstractdataframe/sort.jl
Expand Up @@ -473,7 +473,7 @@ julia> sortperm(df, (:x, :y), rev=true)
"""
function Base.sortperm(df::AbstractDataFrame, cols=[];
alg=nothing, lt=isless, by=identity, rev=false, order=Forward)
if !(isa(by, Function) || (by isa AbstractVector && eltype(by) <: Function))
if !(by isa Base.Callable || (by isa AbstractVector && eltype(by) <: Base.Callable))
msg = "'by' must be a Function or a vector of Functions. " *
" Perhaps you wanted 'cols'."
throw(ArgumentError(msg))
Expand Down

0 comments on commit 93c4512

Please sign in to comment.