ronisbr / PrettyTables.jl

Print data in formatted tables.
MIT License
391 stars 38 forks source link

Select/reorder columns from table #245

Open jebej opened 1 month ago

jebej commented 1 month ago

I have a vector of Dicts, which respects the Tables interface, and it would be useful to be able to select exactly which columns to print as well as reorder them, without needing to build a whole new object. Not sure how easy it would be to implement here!

ronisbr commented 1 month ago

Hi @jebej !

Can you please provide some examples? I think I did not understand what you are trying to achieve.

jebej commented 1 month ago

I mean providing an option to filter and order e.g. cols in pretty_table(data; cols=["col1", "col2"]), where data is some Tables-interface respecting object with appropriately named columns. I quickly looked into it, and making a new object would be pretty easy with TableOperations: https://github.com/JuliaData/TableOperations.jl?tab=readme-ov-file#tableoperationsselect, so this is only worth it if it's also easy to do here.