JuliaData / IndexedTables.jl

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

Implement describe() method for an IndexedTable instance #294

Open chiraganand opened 2 years ago

chiraganand commented 2 years ago

This is what DataFrames does. Perhaps, IndexedTable could use the same formatting with an additional field for showing whether variable is a primary key or not.

julia> describe(df)
2×8 DataFrame
│ Row │ variable │ mean    │ min    │ median  │ max    │ nunique │ nmissing │ eltype   │
│     │ Symbol   │ Float64 │ Real   │ Float64 │ Real   │ Nothing │ Nothing  │ DataType │
├─────┼──────────┼─────────┼────────┼─────────┼────────┼─────────┼──────────┼──────────┤
│ 1   │ year     │ 1923.5  │ 1875   │ 1923.5  │ 1972   │         │          │ Int64    │
│ 2   │ value    │ 579.004 │ 575.96 │ 579.12  │ 581.86 │         │          │ Float64  │