Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alecloudenback committed Apr 27, 2023
1 parent 4780769 commit 78e6fbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/abstractdataframe/abstractdataframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/dataframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78e6fbc

Please sign in to comment.