-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Propose increasing number of columns to 800 #1040
Conversation
@stevengj - do you have an opinion on this proposal? Thank you! |
It would be good to have a decision on this PR before JuliaCon so that Jupyter based materials presented there could take advantage of this change (if it were approved). Thank you! |
I'm happy to merge it, but do you have a MWE just so I can try it out? |
For something like a |
A good point - we checked the same thing in parallel. The MWE is The issue is that if I e.g. do:
all is good and horizontal scroll bar is automatically added. However, if I do:
I get (after setting This is bad and the problem is that for some reason in this case Jupyter Notebook does not insert a horizontal scroll bar. Most likely (I am not 100% about the reason) is that when we do This means that before merging this PR we should first understand in what circumstances Jupyter Notebook inserts a horizontal scroll bar. This would probably also affect display of things like: The issue is discussed on SO. In summary: things are more complex than they seemed :( and this PR should not be merged as is. @nalimilan @ronisbr : what do you think we should do for DataFrames.jl given this context? In essence the problem is:
So it seems that the only solution is to have our own configuration parameter for HTML display width/height? |
You could perhaps insert this change more surgically for just for |
My feeling was that if we anyway need two separate values then the least problematic approach is to have a custom DataFrames.jl specific configuration option. In DataFrames.jl we could just use |
AFAICT the option should be HTML-specific rather than DataFrames/PrettyTables-specific? Or maybe let's just hardcode the value of 800 in DataFrames? I mean, scrolling until the 800th column is totally impractical anyway. Does IJulia set the It's hard to find a good solution because none of these choices is ideal IMO. What should ideally happen is that only the columns that fit on screen should be visible, but users would be able to see other columns by clicking on scroll buttons that would load the next block of columns (or by scrolling indefinitely). Other approaches are just stopgaps. |
I agree, but this would be a big project to do it right (if practically possible at all).
So this is my proposal essentially. But I want to allow this 800 to be changed by setting a proper
|
OK. Then could IJulia set the |
Hi! Sorry for the delay. In PrettyTables, the maximum number of rows or columns that will be printed is just two keyword parameters. Hence, DataFrames can select an environment variable and we use this value when calling |
OK - let us discuss it then when you open a PR to DataFrames.jl. Thank you! |
Closing as this solution is problematic per the comments above. In DataFrames.jl we will use separate values to control display size. |
80 columns in HTML is a very small number given current standards. Especially that browser creates horizontal scroll bar when displaying an object. This should not have a big impact on performance either.
I think leaving 30 lines is OK.