verticapy.vDataColumn.isdate#
- vDataColumn.isdate() bool #
Returns True if the vDataColumn category is date, False otherwise.
Returns#
- bool
True if the vDataColumn category is date.
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.For this example, we will use the Amazon dataset.
import verticapy.datasets as vpd amazon = vpd.load_amazon()
📅dateDateAbcstateVarchar(32)123numberInteger1 1998-01-01 ACRE 0 2 1998-01-01 ALAGOAS 0 3 1998-01-01 AMAPÁ 0 4 1998-01-01 AMAZONAS 0 5 1998-01-01 BAHIA 0 6 1998-01-01 CEARÁ 0 7 1998-01-01 DISTRITO FEDERAL 0 8 1998-01-01 ESPÍRITO SANTO 0 9 1998-01-01 GOIÁS 0 10 1998-01-01 MARANHÃO 0 11 1998-01-01 MATO GROSSO 0 12 1998-01-01 MATO GROSSO DO SUL 0 13 1998-01-01 MINAS GERAIS 0 14 1998-01-01 PARANÁ 0 15 1998-01-01 PARAÍBA 0 16 1998-01-01 PARÁ 0 17 1998-01-01 PERNAMBUCO 0 18 1998-01-01 PIAUÍ 0 19 1998-01-01 RIO DE JANEIRO 0 20 1998-01-01 RIO GRANDE DO NORTE 0 21 1998-01-01 RIO GRANDE DO SUL 0 22 1998-01-01 RONDÔNIA 0 23 1998-01-01 RORAIMA 0 24 1998-01-01 SANTA CATARINA 0 25 1998-01-01 SERGIPE 0 26 1998-01-01 SÃO PAULO 0 27 1998-01-01 TOCANTINS 0 28 1998-02-01 ACRE 0 29 1998-02-01 ALAGOAS 0 30 1998-02-01 AMAPÁ 0 31 1998-02-01 AMAZONAS 0 32 1998-02-01 BAHIA 0 33 1998-02-01 CEARÁ 0 34 1998-02-01 DISTRITO FEDERAL 0 35 1998-02-01 ESPÍRITO SANTO 0 36 1998-02-01 GOIÁS 0 37 1998-02-01 MARANHÃO 0 38 1998-02-01 MATO GROSSO 0 39 1998-02-01 MATO GROSSO DO SUL 0 40 1998-02-01 MINAS GERAIS 0 41 1998-02-01 PARANÁ 0 42 1998-02-01 PARAÍBA 0 43 1998-02-01 PARÁ 0 44 1998-02-01 PERNAMBUCO 0 45 1998-02-01 PIAUÍ 0 46 1998-02-01 RIO DE JANEIRO 0 47 1998-02-01 RIO GRANDE DO NORTE 0 48 1998-02-01 RIO GRANDE DO SUL 0 49 1998-02-01 RONDÔNIA 0 50 1998-02-01 RORAIMA 0 51 1998-02-01 SANTA CATARINA 0 52 1998-02-01 SERGIPE 0 53 1998-02-01 SÃO PAULO 0 54 1998-02-01 TOCANTINS 0 55 1998-03-01 ACRE 0 56 1998-03-01 ALAGOAS 0 57 1998-03-01 AMAPÁ 0 58 1998-03-01 AMAZONAS 0 59 1998-03-01 BAHIA 0 60 1998-03-01 CEARÁ 0 61 1998-03-01 DISTRITO FEDERAL 0 62 1998-03-01 ESPÍRITO SANTO 0 63 1998-03-01 GOIÁS 0 64 1998-03-01 MARANHÃO 0 65 1998-03-01 MATO GROSSO 0 66 1998-03-01 MATO GROSSO DO SUL 0 67 1998-03-01 MINAS GERAIS 0 68 1998-03-01 PARANÁ 0 69 1998-03-01 PARAÍBA 0 70 1998-03-01 PARÁ 0 71 1998-03-01 PERNAMBUCO 0 72 1998-03-01 PIAUÍ 0 73 1998-03-01 RIO DE JANEIRO 0 74 1998-03-01 RIO GRANDE DO NORTE 0 75 1998-03-01 RIO GRANDE DO SUL 0 76 1998-03-01 RONDÔNIA 0 77 1998-03-01 RORAIMA 0 78 1998-03-01 SANTA CATARINA 0 79 1998-03-01 SERGIPE 0 80 1998-03-01 SÃO PAULO 0 81 1998-03-01 TOCANTINS 0 82 1998-04-01 ACRE 0 83 1998-04-01 ALAGOAS 0 84 1998-04-01 AMAPÁ 0 85 1998-04-01 AMAZONAS 0 86 1998-04-01 BAHIA 0 87 1998-04-01 CEARÁ 0 88 1998-04-01 DISTRITO FEDERAL 0 89 1998-04-01 ESPÍRITO SANTO 0 90 1998-04-01 GOIÁS 0 91 1998-04-01 MARANHÃO 0 92 1998-04-01 MATO GROSSO 0 93 1998-04-01 MATO GROSSO DO SUL 0 94 1998-04-01 MINAS GERAIS 0 95 1998-04-01 PARANÁ 0 96 1998-04-01 PARAÍBA 0 97 1998-04-01 PARÁ 0 98 1998-04-01 PERNAMBUCO 0 99 1998-04-01 PIAUÍ 0 100 1998-04-01 RIO DE JANEIRO 0 Rows: 1-100 | Columns: 3Note
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 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.
Let’s check if the category of “date” vcolumn is date or not.
amazon["date"].isdate() Out[2]: True
Let’s check if the category of “state” vcolumn is date or not
amazon["state"].isdate() Out[3]: False