-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Expanded display of dataframe, akin to postgres \x #38827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
isn't it just this
|
output formatting is already quite complex. so we would need a really good reason. |
Thanks, stack is definitely a better description of what I want than melt. The output of running Thus this proposal is really to add an output setting where dataframes are displayed in stacked format, but, say, showing at least K records (which is different than K rows of the series). I can't claim this to be a "really" good reason, just that it's something that would be slick and convenient. It's one of my favorite features in the postgres console! I will play with my personal settings and just assume this isn't something that will likely be worked on, though. Thanks for the reply! |
Thanks for the report, but agreed since Closing, but happy to reopen if there is renewed interest from the other core devs and community. |
Is your feature request related to a problem?
When viewing large dataframes in a terminal, it is often preferable to display the data in "expanded format" or "long format" (as opposed to "wide"), essentially the result of melting every column. This makes the entire dataframe less sensitive to the width of the terminal.
Describe the solution you'd like
Postgres handles this nicely with its expanded mode (see -x or --expanded). To take a random postgres example, the following dataframe
becomes printed as
API breaking implications
I don't see there being any.
Additional context
My naive suggestion would be to place a global option that turns this on, such as
Under the hood, this can be as simple as melting the dataframe, and printing each record out with a separator between them. However I am not familiar with the intricacies of the display logic and leave this here for others' consideration.
The text was updated successfully, but these errors were encountered: