Best way to incrementally print table rows? #2957
Unanswered
davidgilbertson
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case: I'm training a machine learning model. It prints a handful of metrics a few times a minute. It might also print out other messages between these.
If I just print the dicts, I get something like this:
But I want it to be pretty, like this:
It prints each row as it comes, headers are repeated every n lines, and any other printed messages will show between the table rows.
It must work in the PyCharm Python console (I tried one of the
Live
demos and it looked very broken)I've got something working, but it seems a bit hacky, I'm wondering if there is a simpler way? I'd love to be able to print a table with headers hidden, but have the width-calculating function pretend as though there were headers (otherwise each 'row' gets printed with different cell widths)
Beta Was this translation helpful? Give feedback.
All reactions