vDataFrame[].label_encode¶
In [ ]:
vDataFrame[].label_encode()
Encodes the vcolumn using a bijection from the different categories to [0, n - 1] (n being the vcolumn cardinality).
In [11]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic["embarked"])
In [12]:
titanic["embarked"].label_encode()
Out[12]:
See Also¶
vDataFrame[].decode | Encodes the vcolumn using a User Defined Encoding. |
vDataFrame[].discretize | Discretizes the vcolumn. |
vDataFrame[].get_dummies | Encodes the vcolumn using the One Hot Encoding. |
vDataFrame[].mean_encode | Encodes the vcolumn using the Mean Encoding of a response. |