vDataFrame[].mode¶
In [ ]:
vDataFrame[].mode(dropna: bool = False,
n: int = 1)
Returns the nth most occurent element.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
dropna | bool | ✓ | If set to True, NULL values will not be considered during the computation. |
n | int | ✓ | Integer corresponding to the offset. For example, if n = 1 then this method will return the mode of the vcolumn. |
In [38]:
from verticapy.datasets import load_market
display(market)
In [39]:
# Most Occurent Element
market["Name"].mode()
Out[39]:
In [41]:
# 2nd Most Occurent Element
market["Name"].mode(n = 2)
Out[41]:
See Also¶
| vDataFrame.aggregate | Computes the vDataFrame input aggregations. |
