Hi there.
I am the maintainer of OdsIO.jl, a package to export matrices and dataframes to the OpenDocument Spreadsheet format, using ezodf, a Python module.
The problem is that with categorical arrays (now used also in DataFrames) the object is exported, e.g. as <PyCall.jlwrap 'A'> instead that just A.
I don't know if this can be resolved upstream here or in the CategoricalArray package.
if ismissing(v[r,c]) || v[r,c]==nothing
emptyCell = ezodf.Cell()
dcell = get(sheet,(r2-1,c2-1))
dcell = emptyCell
else
dcell = get(sheet,(r2-1,c2-1))
dcell.set_value(v[r,c]) # --> here I (may) pass to PyCall a categorical object
end
You can reproduce this problem with:
using OdsIO, CategoricalArrays
cat = CategoricalArray([`A`,`B`,`C`], ordered=true)
val = [1,2,3]
m = [cat val]
ods_write("test",Dict(("m",1,1)=>m))
Hi there. I am the maintainer of OdsIO.jl, a package to export matrices and dataframes to the OpenDocument Spreadsheet format, using
ezodf
, a Python module.The problem is that with categorical arrays (now used also in
DataFrames
) the object is exported, e.g. as<PyCall.jlwrap 'A'>
instead that justA
.I don't know if this can be resolved upstream here or in the
CategoricalArray
package.For reference, the code I am using is:
You can reproduce this problem with:
Crosslink to the same issue in CategoricalArrays: https://github.com/JuliaData/CategoricalArrays.jl/issues/277