diff --git a/verticapy/core/vdataframe/_typing.py b/verticapy/core/vdataframe/_typing.py index 6e5b03c92..d02c10203 100755 --- a/verticapy/core/vdataframe/_typing.py +++ b/verticapy/core/vdataframe/_typing.py @@ -49,12 +49,99 @@ def astype(self, dtype: dict) -> "vDataFrame": of the dictionary must represent a vDataColumn. The dictionary must be similar to the following: + {"column1": "type1", ... "columnk": "typek"} Returns ------- vDataFrame self + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Titanic dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + Let's check the data types of various vcolumns. + + .. code-block:: python + + data.dtypes() + + .. ipython:: python + :suppress: + + res = data.dtypes() + html_file = open("figures/core_vDataFrame_typing_astype1.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_astype1.html + + Let's change the data type of few vcolumns. + + .. code-block:: python + + data.astype({"fare": "int", "cabin": "varchar(1)"}) + + Let's check the data type of various vcolumns again. + + .. code-block:: python + + data.dtypes() + + .. ipython:: python + :suppress: + + data.astype({"fare": "int", "cabin": "varchar(1)"}) + res = data.dtypes() + html_file = open("figures/core_vDataFrame_typing_astype2.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_astype2.html """ for column in dtype: self[self.format_colnames(column)].astype(dtype=dtype[column]) @@ -69,6 +156,71 @@ def bool_to_int(self) -> "vDataFrame": ------- vDataFrame self + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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: + + .. code-block:: python + + data = vp.vDataFrame( + { + "empid": ['1', '2', '3', '4'], + "is_temp": [True, False, False, True], + } + ) + data + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + { + "empid": ['1', '2', '3', '4'], + "is_temp": [True, False, False, True], + } + ) + res = data + html_file = open("figures/core_vDataFrame_typing_booltoint1.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_booltoint1.html + + Let's change the data type from bool to int. + + .. code-block:: python + + data.bool_to_int() + + .. ipython:: python + :suppress: + + res = data.bool_to_int() + html_file = open("figures/core_vDataFrame_typing_booltoint2.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_booltoint2.html """ columns = self.get_columns() for column in columns: @@ -90,6 +242,74 @@ def catcol(self, max_cardinality: int = 12) -> list: ------- List List of the categorical vDataColumns names. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Titanic dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + Let's check the categorical vcolumns considering maximum + cardinality as 10. + + .. ipython:: python + + data.catcol(max_cardinality = 10) + + Let's again check the categorical vcolumns considering + maximum cardinality as 6. + + .. ipython:: python + + data.catcol(max_cardinality = 6) + + Notice that parch and sibsp are not considered because + their cardinalities are greater than 6. + + .. seealso:: + + | :py:mod:`verticapy.vDataFrame.datecol` + | :py:mod:`verticapy.vDataFrame.numcol` + | :py:mod:`verticapy.vDataFrame.get_columns` """ columns = [] for column in self.get_columns(): @@ -122,6 +342,83 @@ def datecol(self) -> list: ------- List List of all vDataColumns of type date. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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: + + .. code-block:: python + + data = vp.vDataFrame( + { + "empid": ['1', '2', '3', '4'], + "dob": ['1993-01-01', '1988-01-01', '1992-01-01', '1989-01-01'], + "doj": ['2022-01-01', '2023-01-01', '2022-01-01', '2023-01-01'], + "emp_cat":[933, 945, 723, 799], + } + ) + data + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + { + "empid": ['1', '2', '3', '4'], + "dob": ['1993-01-01', '1988-01-01', '1992-01-01', '1989-01-01'], + "doj": ['2022-01-01', '2023-01-01', '2022-01-01', '2023-01-01'], + "emp_cat":[933, 945, 723, 799], + } + ) + res = data + html_file = open("figures/core_vDataFrame_typing_datecol.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_datecol.html + + Let's set the data type of dob and doj to *date*. + + .. code-block:: python + + data["dob"].astype("date") + data["doj"].astype("date") + + .. ipython:: python + :suppress: + + data["dob"].astype("date") + data["doj"].astype("date") + + Let's retrieve the date type vcolumns in the dataset. + + .. ipython:: python + + data.datecol() + + .. seealso:: + + | :py:mod:`verticapy.vDataFrame.catcol` + | :py:mod:`verticapy.vDataFrame.numcol` + | :py:mod:`verticapy.vDataFrame.get_columns` """ columns = [] cols = self.get_columns() @@ -139,6 +436,68 @@ def dtypes(self) -> TableSample: ------- TableSample result. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Titanic dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + Let's check the data type of various vcolumns. + + .. code-block:: python + + data.dtypes() + + .. ipython:: python + :suppress: + + res = data.dtypes() + html_file = open("figures/core_vDataFrame_typing_dtypes.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_dtypes.html """ values = {"index": [], "dtype": []} for column in self.get_columns(): @@ -161,6 +520,70 @@ def numcol(self, exclude_columns: Optional[SQLColumns] = None) -> list: ------- List List of numerical vDataColumns names. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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: + + .. code-block:: python + + data = vp.vDataFrame( + { + "empid": ['1', '2', '3', '4'], + "weight": [140.5, 175, 156.5, 178], + "height": [168.5, 175, 178.5, 170], + "emp_cat":[933, 945, 723, 799], + } + ) + data + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + { + "empid": ['1', '2', '3', '4'], + "weight": [140.5, 175, 156.5, 178], + "height": [168.5, 175, 178.5, 170], + "emp_cat":[933, 945, 723, 799], + } + ) + res = data + html_file = open("figures/core_vDataFrame_typing_numcol.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_numcol.html + + Let's retrieve the numeric type vcolumns in the dataset. + + .. ipython:: python + + data.numcol() + + .. seealso:: + + | :py:mod:`verticapy.vDataFrame.catcol` + | :py:mod:`verticapy.vDataFrame.datecol` + | :py:mod:`verticapy.vDataFrame.get_columns` """ columns, cols = [], self.get_columns(exclude_columns=exclude_columns) for column in cols: @@ -179,18 +602,131 @@ def astype(self, dtype: Union[str, type]) -> "vDataFrame": ---------- dtype: str or Python data type New type. One of the following values: - 'json' : Converts to a JSON string. - 'array': Converts to an array. - 'vmap' : Converts to a VMap. If converting a - delimited string, you can add the - header_names as follows: dtype = - 'vmap(age,name,date)', where the - header_names are age, name, and date. + + - 'json' : Converts to a JSON string. + - 'array': Converts to an array. + - 'vmap' : Converts to a VMap. If converting a + delimited string, you can add the header_names + as follows: dtype = 'vmap(age,name,date)', + where the header_names are age, name, and date. Returns ------- vDataFrame self._parent + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Titanic dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + Let's check the data type of fare vcolumn. + + .. ipython:: python + + data["fare"].dtype() + + Let's change the data type of fare to integer. + + .. code-block:: python + + data["fare"].astype(int) + + .. ipython:: python + :suppress: + + data["fare"].astype(int) + + Let's check the data type of fare vcolumn again. + + .. ipython:: python + + data["fare"].dtype() + + Now, let's see how we can change the data type from + string to array. Let's create a small dataset. + + .. code-block:: python + + data = vp.vDataFrame( + { + "artists": ["Inna, Alexandra, Reea", "Rihanna, Beyonce"] + } + ) + data["artists"].astype("array") + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + { + "artists": ["Inna, Alexandra, Reea", "Rihanna, Beyonce"] + } + ) + res = data["artists"].astype("array") + html_file = open("figures/core_vDataFrame_typing_astypecol1.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_astypecol1.html + + Let's change the datatype of artists to json. + + .. code-block:: python + + data["artists"].astype("json") + + .. ipython:: python + :suppress: + + res = data["artists"].astype("json") + html_file = open("figures/core_vDataFrame_typing_astypecol2.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_astypecol2.html """ dtype = to_sql_dtype(dtype) try: @@ -308,6 +844,62 @@ def category(self) -> str: ------- str vDataColumn category. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Titanic dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + + data = vpd.load_titanic() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + Let's check the category of "fare" and "name" vcolumns. + + .. ipython:: python + + data["fare"].category() + + .. ipython:: python + + data["name"].category() """ return self._transf[-1][2] @@ -319,6 +911,62 @@ def ctype(self) -> str: ------- str vDataColumn DB type. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Titanic dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + + data = vpd.load_titanic() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + data = vpd.load_titanic() + + Let's check the DB type of "fare" and "name" vcolumns. + + .. ipython:: python + + data["fare"].ctype() + + .. ipython:: python + + data["name"].ctype() """ return self._transf[-1][1].lower() @@ -333,6 +981,54 @@ def isarray(self) -> bool: ------- bool True if the vDataColumn is an array. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + .. code-block:: python + + data = vp.vDataFrame( + {"artists": ["Inna, Alexandra, Reea", "Rihanna, Beyonce"]} + ) + data["artists"].astype("array") + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + {"artists": ["Inna, Alexandra, Reea", "Rihanna, Beyonce"]} + ) + res = data["artists"].astype("array") + html_file = open("figures/core_vDataFrame_typing_isarray.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_isarray.html + + Let's check if data type of "artists" vcolumn is array or not. + + .. ipython:: python + + data["artists"].isarray() """ return self.ctype()[0:5].lower() == "array" @@ -345,6 +1041,66 @@ def isbool(self) -> bool: ------- bool True if the vDataColumn is boolean. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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: + + .. code-block:: python + + data = vp.vDataFrame( + { + "empid": [1, 2, 3, 4], + "is_temp": [True, False, False, True], + } + ) + data + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + { + "empid": [1, 2, 3, 4], + "is_temp": [True, False, False, True], + } + ) + res = data + html_file = open("figures/core_vDataFrame_typing_isbool.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_isbool.html + + Let's check if data type of "is_temp" vcolumn is bool or not. + + .. ipython:: python + + data["is_temp"].isbool() + + Let's check if data type of "empid" vcolumn is bool or not. + + .. ipython:: python + + data["empid"].isbool() """ return self.ctype().startswith("bool") @@ -357,6 +1113,64 @@ def isdate(self) -> bool: ------- bool True if the vDataColumn category is date. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + For this example, we will use the Amazon dataset. + + .. code-block:: python + + import verticapy.datasets as vpd + + amazon = vpd.load_amazon() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_amazon.html + + .. note:: + + VerticaPy offers a wide range of sample datasets that are + ideal for training and testing purposes. You can explore + the full list of available datasets in the :ref:`api.datasets`, + which provides detailed information on each dataset + and how to use them effectively. These datasets are invaluable + resources for honing your data analysis and machine learning + skills within the VerticaPy environment. + + .. ipython:: python + :suppress: + + import verticapy.datasets as vpd + amazon = vpd.load_amazon() + + Let's check if the category of "date" vcolumn is date or not. + + .. ipython:: python + + amazon["date"].isdate() + + Let's check if the category of "state" vcolumn is date or not + + .. ipython:: python + + amazon["state"].isdate() """ return self.category() == "date" @@ -369,6 +1183,61 @@ def isnum(self) -> bool: ------- bool True if the vDataColumn is numerical. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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: + + .. code-block:: python + + data = vp.vDataFrame( + { + "empid": [1, 2, 3, 4], + "is_temp": [True, False, False, True], + } + ) + data + + .. ipython:: python + :suppress: + + data = vp.vDataFrame( + { + "empid": [1, 2, 3, 4], + "is_temp": [True, False, False, True], + } + ) + res = data + html_file = open("figures/core_vDataFrame_typing_isbool.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_isbool.html + + Let's check if data type of "empid" vcolumn is numerical or not. + + .. ipython:: python + + data["empid"].isnum() + """ return self.category() in ("float", "int") @@ -381,6 +1250,67 @@ def isvmap(self) -> bool: ------- bool True if the vDataColumn category is VMap. + + Examples + --------- + + We import ``verticapy``: + + .. ipython:: python + + 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. + + .. code-block:: python + + 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") + + .. ipython:: python + :suppress: + + import verticapy as vp + data = vp.vDataFrame( + { + "empid": ['1'], + "mgr": ['{"0.country.id": "214", "0.country.name": "Spain", "0.name": "Luis Enrique Martínez García"}'], + } + ) + res = data["mgr"].astype("vmap") + html_file = open("figures/core_vDataFrame_typing_isvmap.html", "w") + html_file.write(res._repr_html_()) + html_file.close() + + .. raw:: html + :file: SPHINX_DIRECTORY/figures/core_vDataFrame_typing_isvmap.html + + Let's check if data type of "mgr" vcolumn is vmap or not. + + .. ipython:: python + + data["mgr"].isvmap() + + Let's check if data type of "empid" vcolumn is vmap or not. + + .. ipython:: python + + data["empid"].isvmap() """ return self.category() == "vmap" or isvmap( column=self._alias, expr=self._parent._genSQL()