Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an option to have custom recipes to pager #11

Open
bkamins opened this issue Apr 24, 2021 · 3 comments
Open

add an option to have custom recipes to pager #11

bkamins opened this issue Apr 24, 2021 · 3 comments

Comments

@bkamins
Copy link

bkamins commented Apr 24, 2021

This is a general request but what I specifically mean is that if e.g. you do:

DataFrame(rand(100, 100), :auto) |> pager

that it would be possible that recipe would be registered by DataFrames.jl that would by default freeze the "Row" columns and header appropriately. The key thing here is that this recipe would need to be able to properly calculate the number of rows/columns to freeze (currently you have manually count e.g. the width of "Row" column to properly freeze it)

@bkamins
Copy link
Author

bkamins commented Apr 24, 2021

Ah - maybe we can just have a custom pager method in DataFrames.jl once TerminalPager.jl becomes part of PrettyTables.jl and is imported by DataFrames.jl.

@ronisbr
Copy link
Owner

ronisbr commented Apr 24, 2021

Good point. Currently, we can specify the initial freeze using keywords of pager functions. We can also remove the feature that allows the user to change it dynamically. Thus we can compute the size necessary inside DataFrame and call pager with the right numbers. Seems good?

P.S.: By the way, thank you for your contributions here, you always have good comments :)

@bkamins
Copy link
Author

bkamins commented Apr 24, 2021

Thus we can compute the size necessary inside DataFrame and call pager with the right numbers.

This is what I assumed.

We can also remove the feature that allows the user to change it dynamically.

This is OK to keep. It is just important to have a reasonable default when invoking pager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants