Pandas: Options
You can use the following functions to interact with the options in pandas
:
- pd.get_option retrieves the value of the specified option,
- pd.reset_option resets one or more options to their default value, and
- pd.set_option sets the value of the specified option.
For example:
pd.set_option("display.float_format", "{:,}".format)
pd.set_option("display.height", 1000)
pd.set_option("display.max_columns", 500)
pd.set_option("display.max_colwidth", 1000)
pd.set_option("display.max_rows", 500)
pd.set_option("display.precision", 2)
pd.reset_option("all") # Reset all options.
pd.describe_option("rows") # Print description for 'rows' registered option.
pd.describe_option() # Get a listing for all registered options.
Leave a comment