How to combine prettytables and pager?

ufechner7
Wed, 10 Aug 2022 19:18:55 +0000
General Usage

When using prettytables I have a lot of keyword options that I can use to display a pretty table. With the function pager from TerminalPager I can browse through a dataset that does not fit on the screen. How can I combine both?

Example:

using InMemoryDatasets, TerminalPager

function demo_data()
    n = 100
    m = 8
    time = 0.1:0.1:n*0.1
    addr = rand(Int16(0x101):Int16(0x12e), n)
    data = (Symbol("d", i) => rand(UInt8, n) for i in 1:m)
    ds = Dataset(;time, addr, data...)
    ds.addr[5] = missing
    ds
end
ds = demo_data()

Working:

pager(ds, frozen_rows=2)

also

show(ds, show_row_number=false, eltypes=false)

Not working:

pager(ds,  frozen_rows=2, show_row_number=false, eltypes=false)

Any idea?

5 posts - 2 participants