I created a table using t = table(1:10, randn(10), rand(Bool, 10); names = [:x, :y, :z]) and tried to return Bool columns.
The following call should have returned only the z column but it is returning all three. Is this how it should be? Because this is not what select does.
julia> filter(row -> row.z == false, t, select=Bool)
Table with 3 rows, 3 columns:
x y z
───────────────────
1 -1.02158 false
2 -1.14494 false
9 -0.662703 false
I created a table using
t = table(1:10, randn(10), rand(Bool, 10); names = [:x, :y, :z])
and tried to returnBool
columns.The following call should have returned only the
z
column but it is returning all three. Is this how it should be? Because this is not whatselect
does.The
select
function returns only one Bool columnSimilarly, with
Int
:The section of code responsible:
https://github.com/JuliaData/IndexedTables.jl/blob/2e97b488e24b9069cca5449b6e95dc9690ab19a1/src/selection.jl#L241-L245
I would propose the following patch so that the behaviour is consistent with
select()
. Not sure if this is the most efficient way.