Set the number of displayed rows and columns

set_option is a function that allows you to set various options for the behavior of the Pandas library. It is a global configuration tool that allows you to change the default behavior of some of the library's functions and methods.

The set_option function takes two arguments, option and value.

  • The option argument is a string representing the name of the option you want to set.
  • the value argument is the value you want to assign to that option.

Example:

  1. Set maximum number of rows displayed:

    This will limit the output to a maximum of 5 rows.

  2. Set maximum number of columns displayed:

    This will limit the output to a maximum of 3 columns.