diff --git a/src/abstractdataframe/abstractdataframe.jl b/src/abstractdataframe/abstractdataframe.jl index 64e2b7bdc..6b544e602 100644 --- a/src/abstractdataframe/abstractdataframe.jl +++ b/src/abstractdataframe/abstractdataframe.jl @@ -581,7 +581,7 @@ where each row represents a variable and each column a summary statistic. `:last`, `:nnonmissing`, and `:nmissing`. The default statistics used are `:mean`, `:min`, `:median`, `:max`, `:nmissing`, and `:eltype`. - `:detailed` as the only `Symbol` argument to return all statistics - except `:first`, `:last`, `:nuniqueall`, and `:nnonmissing`. + except `:first`, `:last`, `:sum`, `:nuniqueall`, and `:nnonmissing`. - `:all` as the only `Symbol` argument to return all statistics. - A `function => name` pair where `name` is a `Symbol` or string. This will create a column of summary statistics with the provided name. @@ -674,7 +674,7 @@ function _describe(df::AbstractDataFrame, stats::AbstractVector) splice!(stats, i, allowed_fields) # insert in the stats vector to get a good order elseif predefined_funs == [:detailed] predefined_funs = [:mean, :std, :min, :q25, :median, :q75, - :max, :sum, :nunique, :nmissing, :eltype] + :max, :nunique, :nmissing, :eltype] i = findfirst(s -> s == :detailed, stats) splice!(stats, i, predefined_funs) # insert in the stats vector to get a good order elseif :all in predefined_funs || :detailed in predefined_funs diff --git a/test/dataframe.jl b/test/dataframe.jl index 53530823d..d6cf42a6d 100644 --- a/test/dataframe.jl +++ b/test/dataframe.jl @@ -571,7 +571,7 @@ end # Test that it works with :detailed @test describe_output[:, [:variable, :mean, :std, :min, :q25, :median, :q75, - :max, :sum, :nunique, :nmissing, :eltype]] ≅ + :max, :nunique, :nmissing, :eltype]] ≅ describe(df, :detailed) # Test that it works on a custom function