nirum / tableprint

Pretty console printing :clipboard: of tabular data in python :snake:
https://tableprint.readthedocs.io/
MIT License
174 stars 16 forks source link

Auto-width #13

Closed andli closed 4 years ago

andli commented 6 years ago

Love tableprint!

Since everything is monospaced, it should be easy to set the width on each column automatically based on the longest string value of each column (and its header). Could you please implement this? It would save precious horizontal space and fit more columns.

nirum commented 6 years ago

This is a great suggestion! Will work on this next.

sumanthratna commented 4 years ago

Any update on this? I think this would be a very valuable feature to have.

EDIT: I think at the very least, a list of ints OR an int should be passed to width so that we can hardcode some widths. In my case, I'm "eagerly" printing rows (printing as soon as computations are finished), so an actual auto-width feature isn't really feasible.

nirum commented 4 years ago

Only two years late 😄