great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

Ability to render tables to console

Open machow opened this issue 2 years ago • 3 comments

Currently, Great Tables supports rendering to HTML. However, python supports rich table displays in console, using frameworks like rich:

image

Unfortunately, rich does not allow col and rowspan, but we may be able to find a tool that does (or a way to make it work). (see also the less active library dashtable).

A user on the polars discord mentioned this kind of printout in the console would be useful, and I totally agree! This might be something we pursue once we have a good internal representation of a "built" table, that can easily be passed to different renderers.

machow avatar Jan 16 '24 18:01 machow

Hi, I'm confused on this -- the front page says "Finally, the table is rendered by printing it at the console, including it in an notebook environment, or rendering it inside a Quarto document." yet this issue seems to indicate I can't just print() and get a rendered table on the console?

lingfish avatar Sep 20 '24 03:09 lingfish

Shoot -- you're right, the language on printing is misleading. People can get a table displayed from the console by using the GT.show() method to open it in a browser. But we should change "printing at the console".

I can work on a page in our get started guide that details the various ways to display a GT object (this has come up a few times)

machow avatar Sep 20 '24 15:09 machow

The front page still reads the same, "Finally, the table is rendered by printing it at the console, including it in an notebook environment, or rendering it inside a Quarto document."

The ability to to print to console would be very useful. But till then, the front page is misleading and should be fixed. I have submitted a pull request #522 to fix the immediate issue.

trashpan avatar Nov 25 '24 14:11 trashpan