-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
I am seeking a table that looks more like the REPL display of the KeyedArray, rather than stacking it into a DataFrame-style format. Is that possible?
using RectiGrids, AxisKeys, PrettyTables
julia> grid('a':'c', 'A':'C')
2-dimensional KeyedArray(...) with keys:
↓ 3-element StepRange{Char,...}
→ 3-element StepRange{Char,...}
And data, 3×3 RectiGrids.RectiGridArr{Base.OneTo(2), Tuple{Char, Char}, 2, Tuple{Nothing, Nothing}, Tuple{StepRange{Char, Int64}, StepRange{Char, Int64}}}:
('A') ('B') ('C')
('a') ('a', 'A') ('a', 'B') ('a', 'C')
('b') ('b', 'A') ('b', 'B') ('b', 'C')
('c') ('c', 'A') ('c', 'B') ('c', 'C')
julia> pretty_table(grid('a':'c', 'A':'C'))
┌───────┬───────┬────────────┐
│ dim_1 │ dim_2 │ value │
├───────┼───────┼────────────┤
│ a │ A │ ('a', 'A') │
│ b │ A │ ('b', 'A') │
│ c │ A │ ('c', 'A') │
│ a │ B │ ('a', 'B') │
│ b │ B │ ('b', 'B') │
│ c │ B │ ('c', 'B') │
│ a │ C │ ('a', 'C') │
│ b │ C │ ('b', 'C') │
│ c │ C │ ('c', 'C') │
└───────┴───────┴────────────┘Metadata
Metadata
Assignees
Labels
No labels