Skip to content
This repository has been archived by the owner on May 5, 2019. It is now read-only.

Extend StatsBase.describe to handle Nulls #68

Closed
wants to merge 1 commit into from
Closed

Extend StatsBase.describe to handle Nulls #68

wants to merge 1 commit into from

Conversation

cjprybol
Copy link
Contributor

For merging into #66

test/utils.jl Outdated
Number Missing: 3
% Missing: 100.000000
"""
describe(io, Vector{?Int}(1:3))
Copy link
Member

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?

Copy link
Contributor Author

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)
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be $Int.

@nalimilan
Copy link
Member

Thanks. I guess @quinnj should just pick the commit into #66, since this PR cannot really be merged on its own.

@oxinabox
Copy link
Contributor

This will fix: #60
right?

@nalimilan
Copy link
Member

#60 is already fixed on DataTables master.

@cjprybol
Copy link
Contributor Author

cjprybol commented Aug 4, 2017

superseded by #83

@cjprybol cjprybol closed this Aug 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants