I have a large (vertically) pandas dataframe that I would like to display as a nice table with scrollbars. I can get it to display the table with all the rows but I cannot get the scrollbars to display.
def data(x):
strData = strData[['Data1','Data2','Data3']]
display(strData)
output: No vertical scrollbars
Not sure if this is what you mean, but I guess you need to set the max_rows
option to None, so that pandas doesn't put a limit on the number of rows displayed:
pd.set_option("display.max_rows", None)
Update:
In [27]:
##javascript
IPython.OutputArea.auto_scroll_threshold = 10;
In[28]:
def display_():
pd.set_option("display.max_rows", None)
from IPython.core.display import display
display(df) #df must be defined up there