vDataFrame[].spider¶
In [ ]:
vDataFrame[].spider(by: str = "",
method: str = "density",
of: str = "",
max_cardinality: (int, tuple) = (6, 6),
h: (int, float, tuple) = (None, None),
ax=None,
**style_kwds,)
Draws the spider plot of the input vcolumn based on an aggregation.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
by | str | ✓ | vcolumn to use to partition the data. |
method | str | ✓ | One of the following methods used to aggregate the data:
|
of | str | ✓ | The vcolumn to use to compute the aggregation. |
max_cardinality | int / tuple | ✓ | Maximum number of distinct elements for vcolumns 1 and 2 to be used as categorical (No h will be picked or computed) |
h | int / float / tuple | ✓ | Interval width of the vcolumns 1 and 2 bars. It is only valid if the vcolumns are numerical. Optimized h will be computed if the parameter is empty or invalid. |
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 [5]:
# single spider
titanic["pclass"].spider()
Out[5]:
In [6]:
# multi spider
titanic["pclass"].spider(by = "survived",)
Out[6]:
