pandas allows the users to modify some display and formatting options.
The get_option() and set_option() commands let the user view the current setting and change it:
pd.get_option("display.max_rows")
Output: 60
pd.set_option("display.max_rows", 120)
pd.get_option("display.max_rows")
Output: 120
pd.reset_option("display.max_rows")
pd.get_option("display.max_rows")
Output: 60
The preceding options discussed set and reset the number of rows that are displayed when a dataframe is printed. Some of the other useful display options are the following:
- max_columns: Set the number of columns to be displayed.
- chop_threshold: Float values below the limit set here will be displayed as zeros.
- colheader_justify: Set the justification for the column header.
- date_dayfirst: Setting to 'True' prints day first...