Tables.jl icon indicating copy to clipboard operation
Tables.jl copied to clipboard

What does the method `Tables.subset(table, inds::Vector{Int})` return exactly?

Open eliascarv opened this issue 2 years ago • 0 comments

I'm not sure if this method returns a table, a AbstractColumns object or a row iterator, because the documentation doesn't make that very clear.

For example:

# Code 1:
table = #code...
inds = [1, 2, 3]
subset = Tables.subset(table, inds)
column = Tables.getcolumn(subset, :colname)

# Code 2:
table = #code...
inds = [1, 2, 3]
subset = Tables.subset(table, inds)
cols = Tables.columns(subset)
column = Tables.getcolumn(cols, :colname)

In that case what would be the correct code?

eliascarv avatar Nov 21 '22 12:11 eliascarv