-
Notifications
You must be signed in to change notification settings - Fork 11
Extend StatsBase.describe to handle Nulls #68
Conversation
test/utils.jl
Outdated
Number Missing: 3 | ||
% Missing: 100.000000 | ||
""" | ||
describe(io, Vector{?Int}(1:3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last one shouldn't be necessary, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -378,6 +378,32 @@ function StatsBase.describe(io, dt::AbstractDataTable) | |||
println(io, ) | |||
end | |||
end | |||
function StatsBase.describe{T <: Real}(io::IO, X::Vector{Union{T, Null}}) | |||
nullcount = sum(isnull, X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually prefer count
for this sort of thing, but sum
is equivalent so it doesn't really matter
test/utils.jl
Outdated
3rd Quartile: 2.500000 | ||
Maximum: 3.000000 | ||
Length: 3 | ||
Type: Int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be $Int
.
This will fix: #60 |
#60 is already fixed on DataTables master. |
superseded by #83 |
For merging into #66