set_option¶
In [ ]:
set_option(option: str,
value: Union[bool, int, str] = None)
Sets options for VerticaPy.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
option | list | ❌ | Option to use.
|
value | object | ✓ | The new option value. |
Example¶
In [21]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic)
In [2]:
# Sets the maximum number of columns display
from verticapy import *
set_option("max_columns", 3)
titanic
Out[2]:
In [3]:
# Sets the maximum number of rows to display
from verticapy import *
set_option("max_rows", 5)
titanic
Out[3]:
In [8]:
# Light Mode
set_option("mode", "light")
titanic
Out[8]:
In [9]:
# Full Mode
set_option("mode", "full")
titanic
Out[9]:
In [10]:
# Displaying the loading bar
set_option("percent_bar", True)
titanic
Out[10]:
In [18]:
# Displaying the query and execution time
set_option("sql_on", True)
set_option("time_on", True)
titanic.corr()
Out[18]:
In [8]:
# Setting a seed for the random state
set_option("random_state", 2)
In [12]:
# The random state is seeded
titanic.sample(0.1).shape()
Out[12]:
In [13]:
titanic.sample(0.1).shape()
Out[13]:
In [28]:
# Setting graphic colors
set_option("colors", ["blue", "red"])
titanic.hist(["pclass", "survived"])
Out[28]:
In [22]:
# Changing graphics color
set_option("color_style", "retro")
titanic.hist(["pclass", "survived"])
Out[22]: