-
Notifications
You must be signed in to change notification settings - Fork 250
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
[WIP] work towards updating to DataFrames v0.11+ framework #1088
Conversation
i haven't been able to fix everything due to slight inconsistencies between PooledDataArrays and CategoricalArrays behavior. See JuliaData/CategoricalArrays.jl#117 for details. Working towards a fix for GiovineItalia#1065
thanks for tackling this. i don't use DataFrames much, so am not familiar with the API changes. please though make use of the regression testing infrastructure in Gadfly before you merge. |
I definitely don't plan on merging this until it's thoroughly vetted since it's a lot of major changes. |
@@ -1,13 +1,13 @@ | |||
#Is this usable data? | |||
isconcrete{T<:Number}(x::T) = !isna(x) && isfinite(x) | |||
isconcrete{T<:Number}(x::T) = !ismissing(x) && isfinite(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 guess it should be something like:
isconcrete(::Missing) = false
isconcrete(x::Number) = isfinite(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.
Good catch. This should fix #1083 too, I think
Cc: @andreasnoack |
Doh. I've been through almost all the same changes earlier this week. A good reminder to open a I had a lot of issues with the wrapping behavior of |
It would be great if you could push your changes to this PR or make a new PR, which ever is easier.
Agreed. And this was where I got hung up as well. |
Out of interest, JuliaArrays/IndirectArrays.jl#12 |
PooledDataArray(newdata, newpool, [false for _ in newdata]) | ||
end | ||
cat_aes_var!{T}(xs::CategoricalArray{T}, ys::CategoricalArray{T}) = vcat(xs, ys) | ||
cat_aes_var!{T, U}(xs::CategoricalArray{T}, ys::CategoricalArray{U}) = vcat(xs, ys) |
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.
BTW, cat_aes_var{T}(...)
is pre-0.6 syntax. Since DataFrames 0.11 requires 0.6, it's better write it as cat_aes_var(...) where {T}
, although in this particular case it could be as simple as (replaces both definitions)
cat_aes_var!(xs::CategoricalArray, ys::CategoricalArray) = vcat(xs, ys)
if typeof(vals) <: PooledDataArray | ||
setfield!(aes_grid[i, j], var, | ||
make_pooled_data_array(typeof(vals), staging[i, j])) | ||
if typeof(vals) <: CategoricalArray |
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.
vals isa CategoricalArray
or isa(vals, CategoricalArray)
is shorter
Closed in favor of #1090 |
i haven't been able to fix everything due to slight inconsistencies between PooledDataArrays and CategoricalArrays behavior. See JuliaData/CategoricalArrays.jl#117 for
details. Working towards a fix for #1065.
It would nice to have this soon as we're holding back the whole DataFrames ecosystem until we do. Maybe @alyst and @nalimilan could also provide us some feedback to get this working with v0.11