Skip to content

Ability to scroll through dataframe or series for viewing #4193

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

Closed
vipatel10 opened this issue Jul 10, 2013 · 9 comments
Closed

Ability to scroll through dataframe or series for viewing #4193

vipatel10 opened this issue Jul 10, 2013 · 9 comments
Labels
Output-Formatting __repr__ of pandas objects, to_string Usage Question

Comments

@vipatel10
Copy link

I think it would be nice to be able to scroll through a DataFrame by calling whatever scroll function and then holding down the up or down arrow to scroll through the different rows in a series or dataframe and the left and right arrows to scroll across various columns. Currently, it's a little cumbersome to type in different index ranges if you want to quickly look at different parts of a dataframe ala df[0:60], then df[60:120], etc.

@cpcloud
Copy link
Member

cpcloud commented Jul 13, 2013

Maybe a method called page? Want to submit a pr?

@jtratner
Copy link
Contributor

Saw this earlier and was thinking of something like:

def page(sliceable, step=10, start=0):
      last = nxt = start
      past_end = False
      while not past_end:
          last, nxt = nxt, nxt + step
          yield sliceable[last:nxt]
          if nxt > len(sliceable):
              past_end = True

Caveat: this was quick and dirty, would need to test to make sure it covers 0 length sliceables and covers the entire end of the array.

@cpcloud
Copy link
Member

cpcloud commented Jul 20, 2013

@jtratner i like that!

i was thinking something a little different

was thinking you could page through the frame in an actual pager

what u wrote there could be the backend for it, maybe your method could be called chunk then

something like df.page(n) would open a pager in the terminal with the frame

would be equiv to something like df.head(n).chunk(step=1) and show that in the pager
although not sure the chunk is necessary there

but i think it could be a separate issue/feature/pr

@ghost
Copy link

ghost commented Jan 24, 2014

related #5611

@jreback jreback modified the milestones: 0.15.0, 0.14.0 Mar 14, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 3, 2015
@mattayes
Copy link
Contributor

It's been a while, is there any traction behind this issue? Is this something pandas should support, or is it more the purview of ipython, Jupyter, etc.? There's a related issue that thought it was the latter.

@jreback
Copy link
Contributor

jreback commented Jan 11, 2017

this was for a text paginator, not an html one (which is the purview of ipython/jupyter).

@mattayes
Copy link
Contributor

Thanks for clarifying, @jreback.

@datapythonista datapythonista modified the milestones: Contributions Welcome, Someday Jul 8, 2018
@nokados
Copy link

nokados commented Jan 8, 2019

Use this gist to paginate pandas Dataframe within Jupyter Notebook:
https://gist.github.com/nokados/e8f0a64b55099f2f07a50f2b090c91c7

@mroeschke
Copy link
Member

This seems a little out of scope for pandas now and more suited for jupyter. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string Usage Question
Projects
None yet
Development

No branches or pull requests

8 participants