I work with Series and DataFrames on the terminal a lot. The default __repr__
for a Series returns a reduced sample, with some head and tail values, but the rest missing.
Is there a builtin way to pretty-print the entire Series / DataFrame? Ideally, it would support proper alignment, perhaps borders between columns, and maybe even color-coding for the different columns.
pd.set_option('display.max_rows', 1000)
for example, the colouring is something else, I assume you are talking about colouring the html repr output. I don't think this is built in at all. – EdChumdisplay.max_rows
, the problem is that most of the time I do want output to be truncated. It is only occasionally that I wish to see the full output. I could set the option to a very high value, use the default__repr__
, then revert the value, but that seems a bit cumbersome, and I might as well write my own pretty-print function in that case. – Dun Pealset_option
that supports the colouring, it maybe something that could be done as a plugin to apply some css or output formatting. This is the only way I think you could achieve this – EdChum