Created
August 27, 2020 23:27
-
-
Save jpiwowar/b0e23489bc4208f2c203a2f8eea73588 to your computer and use it in GitHub Desktop.
Adjust rows displayed for pandas dataframe in Jupyter notebook/iPython
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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