Loading...

verticapy.vDataColumn.isvmap#

vDataColumn.isvmap() bool#

Returns True if the vDataColumn category is VMap, False otherwise.

Returns#

bool

True if the vDataColumn category is VMap.

Examples#

We import verticapy:

import verticapy as vp

Hint

By assigning an alias to verticapy, we mitigate the risk of code collisions with other libraries. This precaution is necessary because verticapy uses commonly known function names like “average” and “median”, which can potentially lead to naming conflicts. The use of an alias ensures that the functions from verticapy are used as intended without interfering with functions from other libraries.

Let’s create a small dataset.

data = vp.vDataFrame(
    {
        "empid": ['1'],
        "mgr": ['{"0.country.id": "214", "0.country.name": "Spain", "0.name": "Luis Enrique Martínez García"}'],
    }
)
data["mgr"].astype("vmap")
Abc
empid
Varchar(1)
100%
🛠
Vmap
100%
11

Let’s check if data type of “mgr” vcolumn is vmap or not.

data["mgr"].isvmap()
Out[2]: True

Let’s check if data type of “empid” vcolumn is vmap or not.

data["empid"].isvmap()
Out[3]: False