Add option to print the table transposed
Ref: https://github.com/JuliaData/DataFrames.jl/issues/2065
@bkamins one question for later:
If I transpose the tables (think about DataFrames), what would become the header? The row numbers?
@scls19fr Hi! Maybe you can also provide me some guidance since you are who requested the feature :)
I think row numbers as headers unless they are turned off - then no header. I guess for column names and eltype (unless it is turned off) we can use some standard names. So I imagine something like:
2×2 DataFrame
Row │ x y
│ Float64 Float64
─────┼──────────────────
1 │ 1.0 2.0
2 │ 2.0 3.0
getting printed as (but with the vertical bar moved after eltype - I do not know how to cleanly do it, but for sure it is doable given the flexibility PrettyTables.jl have :smile:):
Transposed 2×4 DataFrame
name │ eltype 1 2
──────┼───────────────────────────
x │ Float64 1.0 2.0
y │ Float64 2.0 3.0
Hi @ronisbr and @bkamins
what @bkamins is showing looks good to me. but an other representation could be simply
Transposed 2×4 DataFrame
Col | 1 2
───────────┼──────────────────────
x Float64 | 1.0 2.0
y Float64 | 2.0 3.0
Any chance someone has time to push this one along? I think this would be great feature.
Hi @ablaom !
It is on my TODO list :) I am just lacking time currently because I need to implement many modification in SatelliteToolbox.jl for a project at my work. However, if someone wants to try, after a huge rewrite, it shouldn't be that hard.
If nobody can implement that, I will put it on top of my priorities list.