JuliaData / IndexedTables.jl

Flexible tables with ordered indices
https://juliadb.org
MIT License
121 stars 37 forks source link

select could accept both column number[s] and dimlabel[s] #37

Closed JeffreySarnoff closed 7 years ago

JeffreySarnoff commented 7 years ago

Now that dimlabels(x::IndexedTable) exists, it would be helpful to have select become dimlable aware.


hitemps = Table(Columns(city = [fill("New York",3); fill("Boston",3)],
                        date = repmat(Date(2016,7,6):Date(2016,7,8), 2)),
                [91,89,91,95,83,76])

# suggesting

select(hitemps, 1)    == select(hitemps, :city)
select(hitemps, 1, 2) == select(hitemps, :city, :date)
select(hitemps, 2, 1) == select(hitemps, :date, :city)
JeffreySarnoff commented 7 years ago

it alreay works!