DataFrames.jl icon indicating copy to clipboard operation
DataFrames.jl copied to clipboard

Could a DataFrameRow be shown as a record rather than as a table?

Open akosuas opened this issue 3 years ago • 4 comments

Currently a single row is still printed as a "DataFrame" - i.e. a 1-row table, with truncated columns. I wonder if it would be more natural to show a single row (a "record") vertically, with one row per field? This would make it much easier to inspect a single record that has a lot of fields/columns.

akosuas avatar Feb 03 '21 15:02 akosuas

We could, but it would probably require a completely separate code path for this.

@ronisbr - any opinion on this?

bkamins avatar Feb 03 '21 15:02 bkamins

Note, this would be similar to dplyr's glimpse function which I quite like...

tcovert avatar Feb 03 '21 18:02 tcovert

This also seems nice.

Tables.jl has a row type which prints like a named tuple. We could change upstream and copy their printing as well.

pdeffebach avatar Feb 04 '21 21:02 pdeffebach

Yes, if anyone wants to improve AbstractRow/AbstractColumns default printing, I would love a PR: https://github.com/JuliaData/Tables.jl/blob/bdde6d343a9717cf78c7b442d142a9699688dbdc/src/Tables.jl#L193

quinnj avatar Feb 04 '21 21:02 quinnj