-
Notifications
You must be signed in to change notification settings - Fork 601
Clearer/better str and repr for expressions #182
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
Conversation
Just an idea |
3b2468f to
6ec7189
Compare
|
I've given this a long thought.. In essence I agree with @datascienceit. A column view as he suggested is the most readable, but can be at time annoying having to scroll down. Indeed, having a head and tail number of values set to for e.g. 10 should be a good enough overview of the contents. Initially I was not convinced if we should at all show the size/length of a column. After all, columns come from a (for now) dense tabular dataset, and they all would have the same length. But on second thought, it would be useful when comparing columns from different tables.. so perhaps it is fine to lave it in. Also a column view leaves the option to add index, if we decide to go for a fancier way for indexing rows. My competing idea was to have a row based printing. Something like The downside of this idea is that is it hard to display an index here, if that becomes necessary. Also for values with many decimal places, or text/string columns with a bit longer length, the readability will go down fast. So I would vote for the 1st idea, as suggested by @datascienceit |
|
I like it a lot.
I know it's a bit silly, but can we align the numbers? Those are the most
important in my eyes.
I would also think it would be nice if the dtype will be a line bellow,
which will make it and the length more readable.
Real good job, this makes a lot of difference.
…On Fri, 8 Mar 2019, 09:57 Maarten Breddels, ***@***.***> wrote:
I've settle together with Jovan on this for the moment:
[image: image]
<https://user-images.githubusercontent.com/1765949/54018251-76713880-4188-11e9-90a6-a0c787724c86.png>
We can do a prettier html version later, the idea is just to some values,
the expression (clipped to 1 line max), and the dtype and state of the
expression (normal column or expression).
We print the meta information on top, since in the notebook, you see that
first, and when you see the bottom you see the row number as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#182 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/Aj9o8B2JmVoqPPk2zwgL03OGdJG7SJlWks5vUiYWgaJpZM4bG7D5>
.
|
|
The reason why we decided to put all the 'meta-data' above the table, is that the user would not need to scroll all the way to the bottom each time a column is printed, in the case we choose the do the 1st and last 10 entries. At times I find this quite annoying in other libraries... |
there are still 2 issues, if it contains masked values, it is not aligned with the decimal (can be fixed). By default the 'g' formatting is used for decimals, which does not do 0 padding in the end, which can look unclean, but makes it more clear what are round numbers etc. |
e4e601c to
9d7df37
Compare
|
Thanks for the feedback all! |


This is a start for cleaner expression printing, ideas/improvements welcome, this is just a cleaned up version of what we had.
TODO: