Closed juliohm closed 6 months ago
cc: @nalimilan ?
The example given above works here on Julia master.
Also the comment # select non-categorical columns
is wrong, as :Rock
and :Land
columns are CategoricalArrays
. And indeed the backtrace clearly indicates that a CategoricalVector
is involved. What's weird is that Tables.matrix
seems to be trying to create a Matrix{Float64}
, which doesn't fit the type.
Would you be able to provide a simpler reproducer?
The example given above works here on Julia master.
Also the comment
# select non-categorical columns
is wrong, as:Rock
and:Land
columns areCategoricalArrays
. And indeed the backtrace clearly indicates that aCategoricalVector
is involved. What's weird is thatTables.matrix
seems to be trying to create aMatrix{Float64}
, which doesn't fit the type.Would you be able to provide a simpler reproducer?
How is the comment wrong? The selection is only mentioning columns that are float? It shouldn't involve the other columns that are categorical and yet the Tables.matrix crashes. I will try to reproduce with the master branch, maybe the issue has been fixed and a release is missing?
Sorry, I was confused by the fact that printing t
prints the DataFrameColumns
object from which it's extracted.
I'm able to reproduce the problem. It seems that TableOperations.select
incorrectly returns the first columns of its parent table:
julia> collect(Tables.Columns(t)) == collect(Tables.Columns(jura[!, 1:7]))
true
Closing as we now have TableTransforms.Select that is more flexible and actively maintained.
MWE: