Skip to content

Instantly share code, notes, and snippets.

@jpiwowar
Created August 27, 2020 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpiwowar/b0e23489bc4208f2c203a2f8eea73588 to your computer and use it in GitHub Desktop.
Save jpiwowar/b0e23489bc4208f2c203a2f8eea73588 to your computer and use it in GitHub Desktop.
Adjust rows displayed for pandas dataframe in Jupyter notebook/iPython
def big_display(my_df,rows_temp=50):
'''
Purpose: Expand the default display for Jupyter notebook output, and
revert to previous boring values afterward
Requires: df: input dataframe/Series for display
rows: number of rows to display (default 50)
Warning: Managenent is not responsible for ugly notebook output if you
forget to set the cell output to scroll
'''
with pd.option_context("display.min_rows", rows_temp,
"display.max_rows", rows_temp):
display(my_df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment