verticapy.vDataColumn.isarray#
- vDataColumn.isarray() bool #
Returns True if the vDataColumn is an array, False otherwise.
Returns#
- bool
True if the vDataColumn is an array.
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 fromverticapy
are used as intended without interfering with functions from other libraries.Let’s create a small dataset.
data = vp.vDataFrame( {"artists": ["Inna, Alexandra, Reea", "Rihanna, Beyonce"]} ) data["artists"].astype("array")
🛠artistsArray100%1 ['Inna', 'Alexandra', 'Reea'] 2 ['Rihanna', 'Beyonce'] Let’s check if data type of “artists” vcolumn is array or not.
data["artists"].isarray() Out[2]: True