Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaNs and quantile #45

Open
diegozea opened this issue May 25, 2016 · 0 comments
Open

NaNs and quantile #45

diegozea opened this issue May 25, 2016 · 0 comments

Comments

@diegozea
Copy link

Using DataFrames.describe over a dataset with NaNs gives an error, because quantiles throws an error when the input has at least one NaN.

DataFrames could manage that error using try, but maybe quantiles should return NaNs when there are NaNs in the input.

Related issue: JuliaLang/julia#1142

julia> using RDatasets

julia> iris = dataset("datasets", "iris");

julia> iris[2,1] = NaN;

julia> describe(iris)
SepalLength
ERROR: ArgumentError: quantiles are undefined in presence of NaNs
 in quantile! at statistics.jl:545
 in quantile at statistics.jl:609
 in describe at /home/dzea/.julia/v0.4/DataFrames/src/abstractdataframe/abstractdataframe.jl:413
 in describe at /home/dzea/.julia/v0.4/DataFrames/src/abstractdataframe/abstractdataframe.jl:402
 in describe at /home/dzea/.julia/v0.4/DataFrames/src/abstractdataframe/abstractdataframe.jl:398
@KristofferC KristofferC reopened this Jun 25, 2017
@KristofferC KristofferC transferred this issue from JuliaLang/julia Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants