vDataFrame[].boxplot¶
In [ ]:
vDataFrame[].boxplot(by: str = "",
h: float = 0,
max_cardinality: int = 8,
cat_priority: list = [],
ax=None,
**style_kwds,)
Draws the box plot of a vcolumn.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
by | str | ✓ | vcolumn to use to partition the data. |
h | float | ✓ | Interval width if the vcolumn is numerical or of type date like. Optimized h will be computed if the parameter is empty or invalid. |
max_cardinality | int | ✓ | Maximum number of vcolumn distinct elements to be used as categorical. The less frequent elements will be gathered together to create a new category : 'Others'. |
cat_priority | list | ✓ | List of the different categories to consider when drawing the Box Plot. The other categories will be filtered. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
In [1]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic)
In [4]:
titanic["age"].boxplot()
Out[4]:
In [7]:
# boxplot age partitioned by fare
titanic["age"].boxplot(by = "fare",)
Out[7]:
See Also¶
| vDataFrame.boxplot | Draws the Box Plot of the input vcolumns. |
