-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: A new method that will more efficiently display 'tall' df #42837
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
there have been multiple requests for something like this pls search and link similar issues |
I thought that would be the case. I'm not finding the other related issues. I believe you that they're there... seems like this would be a common request. Apologies that my keyword search skills are falling short here. |
Thanks for the finds. My reads... #38827 - Expanded views. #27000 - Updated logic on display truncation. #18691 - Add an 'ends' method. #9179 - Interactivity #7005 - Left and Right methods . . . # Display left five columns
df.transpose().head().transpose()
# Display right five columns
df.transpose().tail().transpose() Thanks to @jreback for the leads. I'm not sure next steps. My goal was to put it out there as a possible enhancement. I don't think I have the time to contribute just right now. Happy to chat a bit more about other options. |
Thanks for the request, but it appears there hasn't been much traction for this request over the years so closing |
Is your feature request related to a problem?
I wish there was a way to preserve verticle screen space when I'm inspecting 'tall' data frames. These are data frames with many observaitons but few columns. Thus, they're tall. I use the word tall to avoid conflating with long data.
Describe the solution you'd like
I believe this function accomplishes the goal:
API breaking implications
Not applicable and/or unsure.
Describe alternatives you've considered
So the above function works great. Try it out. Take a look over at this colab notebook that demonstrates:
https://colab.research.google.com/drive/1mcNLlG6RVbhoXGCMdVyUryxKSgcaRPNC?usp=sharing
But, I'd propose a new method. Something like
Pandas.DataFrame.inspect()
orPandas.DataFrame.insp()
- to compliment the.head()
-.sample()
- and.tail()
methods.Additional Context
Inspired by the first suggestion in this article:
https://towardsdatascience.com/pandas-hacks-that-i-wish-i-had-when-i-started-out-1f942caa9792
(See the first 'hack' of the three).
The text was updated successfully, but these errors were encountered: