{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/Feather.jl/issues/25","repository_url":"https://api.github.com/repos/JuliaStats/Feather.jl","labels_url":"https://api.github.com/repos/JuliaStats/Feather.jl/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/Feather.jl/issues/25/comments","events_url":"https://api.github.com/repos/JuliaStats/Feather.jl/issues/25/events","html_url":"https://github.com/JuliaStats/Feather.jl/issues/25","id":180939511,"number":25,"title":"bizarre `DataFrames` issue causes a conversion failure sometimes","user":{"login":"ExpandingMan","id":11379353,"avatar_url":"https://avatars.githubusercontent.com/u/11379353?v=3","gravatar_id":"","url":"https://api.github.com/users/ExpandingMan","html_url":"https://github.com/ExpandingMan","followers_url":"https://api.github.com/users/ExpandingMan/followers","following_url":"https://api.github.com/users/ExpandingMan/following{/other_user}","gists_url":"https://api.github.com/users/ExpandingMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpandingMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpandingMan/subscriptions","organizations_url":"https://api.github.com/users/ExpandingMan/orgs","repos_url":"https://api.github.com/users/ExpandingMan/repos","events_url":"https://api.github.com/users/ExpandingMan/events{/privacy}","received_events_url":"https://api.github.com/users/ExpandingMan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-04T16:18:19Z","updated_at":"2016-10-04T16:50:11Z","closed_at":"2016-10-04T16:42:40Z","body":"Ok, here is a strange problem that is largely the fault of the `DataFrames` package but it almost surely needs to be addressed here as well.\r\n\r\nWhen attempting to serialize a `DataFrame` one gets the following error:\r\n```\r\nERROR: LoadError: MethodError: no method matching values(::DataArrays.DataArray{Float64,1})\r\nClosest candidates are:\r\n  values(::Array{T,1}) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:265\r\n  values(::NullableArrays.NullableArray{T,1}) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:268\r\n  values{S,R}(::Union{CategoricalArrays.CategoricalArray{S,1,R},CategoricalArrays.NullableCategoricalArray{S,1,R}}) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:269\r\n in writecolumn(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Type{Float64}, ::DataArrays.DataArray{Float64,1}) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:297\r\n in close!(::Feather.Sink) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:407\r\n in #write#26(::Bool, ::Dict{Int64,Function}, ::Array{Any,1}, ::Function, ::String, ::DataFrames.DataFrame) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:454\r\n in write(::String, ::DataFrames.DataFrame) at /home/savastio/.julia/v0.5/Feather/src/Feather.jl:453\r\n in include_from_node1(::String) at ./loading.jl:488\r\nwhile loading /home/savastio/src/feather_performance.jl, in expression starting on line 184\r\n```\r\n\r\nWhat's particularly bizarre about this is that whether or not one gets this error depends on how the `DataFrame` was constructed.  Apparently, if one constructs the `DataFrame` directly from an array using something like `DataFrame(A)` then the `DataFrame` column is a `Vector`.  However, if one constructs the `DataFrame` in any other way such as by assigning individual columns (i.e. `DataFrame(A=A, B=B)`) then the columns are `DataArray`s.  Clearly this is a fault with `DataFrames` and it should be changed so that these objects are always `DataArray`s.  I wanted to see what people thought about the issue here before I opened one on `DataFrames`.\r\n\r\nAnyway, certainly `Feather` should support both cases.  Adding the method\r\n```julia\r\nvalues(A::DataArray) = convert(Vector, A)\r\n```\r\nto Feather.jl seems to completely fix the problem, but this doesn't address cases when there are `NA`s.  Since there isn't a canonical binary representation of `NA` so it wouldn't be unreasonable to throw an error if there are `NA`s.  Actually, with the change I suggested above it throws a rather appropriate `LoadError` saying that it can't convert `DataArray` with `NA` to the desired type, so maybe nothing further needs to be done."},"comment":{"url":"https://api.github.com/repos/JuliaStats/Feather.jl/issues/comments/251445423","html_url":"https://github.com/JuliaStats/Feather.jl/issues/25#issuecomment-251445423","issue_url":"https://api.github.com/repos/JuliaStats/Feather.jl/issues/25","id":251445423,"user":{"login":"ExpandingMan","id":11379353,"avatar_url":"https://avatars.githubusercontent.com/u/11379353?v=3","gravatar_id":"","url":"https://api.github.com/users/ExpandingMan","html_url":"https://github.com/ExpandingMan","followers_url":"https://api.github.com/users/ExpandingMan/followers","following_url":"https://api.github.com/users/ExpandingMan/following{/other_user}","gists_url":"https://api.github.com/users/ExpandingMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpandingMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpandingMan/subscriptions","organizations_url":"https://api.github.com/users/ExpandingMan/orgs","repos_url":"https://api.github.com/users/ExpandingMan/repos","events_url":"https://api.github.com/users/ExpandingMan/events{/privacy}","received_events_url":"https://api.github.com/users/ExpandingMan/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T16:50:11Z","updated_at":"2016-10-04T16:50:11Z","body":"Ah, didn't see that, ok thanks."}}
{"actor":{"display_login":"ExpandingMan"}}