Repository navigation
Update Row repr to be consistent with Table repr - #4066
Conversation
|
To me it's not terribly natural to represent a single row as though it were a single-row table with all the column headings, etc. But I could see the argument for it. |
|
@embray - I find the current repr (and str) completely useless: From a coding (and thinking) perspective the new look was the simplest and fastest, but if you have any other ideas I'm happy to listen. |
|
My personal preference is still for something more tuple-like, with units inline with the numeric values. But I'll give you that--this is definitely better than the existing situation 👍 |
|
That's interesting and definitely makes me think about it. I still worry that once you get beyond a handful of columns that it gets difficult to represent the name, type, value, and unit in a way that lets the user quickly associate all those for a single column. |
|
Yeah, you're probably right. I don't have any better ideas. |
Update Row repr to be consistent with Table repr

This updates the
Rowrepresentation to be consistent with the correspondingTablerepresentation for that row. It also adds HTML representation so a row displays nicely in IPython notebook.The one substantive difference between the Row and Table repr is that for Row the
max_widthis set to-1, corresponding to no limit on the width. I think that when examining a Row is it more natural to get all the values even if it ends up wrapping. Also a row object has nopformatorpprintmethods so there would be no way to get the full set of values for a wide table. Of course we could add those methods, but I don't think there is a huge need in this case.