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 fromverticapyare used as intended without interfering with functions from other libraries.For this example, we will use the
amazondataset.import verticapy.datasets as vpd amazon = vpd.load_amazon()
📅dateAbcstate123number1 1998-01-01 AMAPÁ 0 2 1998-01-01 AMAZONAS 0 3 1998-01-01 DISTRITO FEDERAL 0 4 1998-01-01 ESPÍRITO SANTO 0 5 1998-01-01 MARANHÃO 0 6 1998-01-01 PARANÁ 0 7 1998-01-01 PIAUÍ 0 8 1998-01-01 RORAIMA 0 9 1998-01-01 SERGIPE 0 10 1998-01-01 SÃO PAULO 0 11 1998-02-01 GOIÁS 0 12 1998-02-01 MATO GROSSO DO SUL 0 13 1998-02-01 MINAS GERAIS 0 14 1998-02-01 PARAÍBA 0 15 1998-02-01 SANTA CATARINA 0 16 1998-02-01 SÃO PAULO 0 17 1998-03-01 AMAPÁ 0 18 1998-03-01 BAHIA 0 19 1998-03-01 MATO GROSSO DO SUL 0 20 1998-03-01 PARÁ 0 21 1998-03-01 PERNAMBUCO 0 22 1998-03-01 RIO GRANDE DO SUL 0 23 1998-04-01 CEARÁ 0 24 1998-04-01 PARANÁ 0 25 1998-04-01 PARAÍBA 0 26 1998-04-01 PARÁ 0 27 1998-05-01 ALAGOAS 0 28 1998-05-01 AMAPÁ 0 29 1998-05-01 MARANHÃO 0 30 1998-05-01 MATO GROSSO DO SUL 0 31 1998-05-01 RIO GRANDE DO SUL 0 32 1998-05-01 TOCANTINS 0 33 1998-06-01 ESPÍRITO SANTO 6 34 1998-06-01 RIO DE JANEIRO 3 35 1998-06-01 RIO GRANDE DO NORTE 1 36 1998-06-01 SÃO PAULO 451 37 1998-07-01 ESPÍRITO SANTO 37 38 1998-07-01 MARANHÃO 274 39 1998-07-01 MATO GROSSO 360 40 1998-07-01 MATO GROSSO DO SUL 3712 41 1998-07-01 PARAÍBA 0 42 1998-07-01 PARÁ 638 43 1998-07-01 RONDÔNIA 365 44 1998-07-01 SÃO PAULO 596 45 1998-08-01 ALAGOAS 1 46 1998-08-01 BAHIA 815 47 1998-08-01 DISTRITO FEDERAL 48 48 1998-08-01 ESPÍRITO SANTO 38 49 1998-08-01 MARANHÃO 1176 50 1998-08-01 MATO GROSSO 228 51 1998-08-01 MINAS GERAIS 875 52 1998-08-01 PIAUÍ 711 53 1998-08-01 RIO GRANDE DO SUL 9 54 1998-08-01 RORAIMA 0 55 1998-08-01 SERGIPE 0 56 1998-09-01 AMAPÁ 20 57 1998-09-01 DISTRITO FEDERAL 33 58 1998-09-01 PIAUÍ 1991 59 1998-09-01 RORAIMA 2 60 1998-10-01 AMAZONAS 83 61 1998-10-01 GOIÁS 1034 62 1998-10-01 MATO GROSSO 576 63 1998-10-01 PARAÍBA 179 64 1998-10-01 PARÁ 3665 65 1998-10-01 PIAUÍ 2586 66 1998-10-01 SERGIPE 0 67 1998-11-01 ALAGOAS 19 68 1998-11-01 AMAPÁ 131 69 1998-11-01 CEARÁ 575 70 1998-11-01 DISTRITO FEDERAL 0 71 1998-11-01 MARANHÃO 2237 72 1998-11-01 RIO DE JANEIRO 6 73 1998-11-01 RIO GRANDE DO SUL 28 74 1998-11-01 SÃO PAULO 488 75 1998-12-01 BAHIA 82 76 1998-12-01 MARANHÃO 1399 77 1998-12-01 MATO GROSSO 100 78 1998-12-01 PARAÍBA 51 79 1998-12-01 PERNAMBUCO 59 80 1998-12-01 RIO DE JANEIRO 1 81 1998-12-01 RONDÔNIA 33 82 1998-12-01 TOCANTINS 9 83 1999-01-01 ALAGOAS 58 84 1999-01-01 GOIÁS 14 85 1999-01-01 MATO GROSSO 239 86 1999-01-01 MINAS GERAIS 36 87 1999-01-01 PARÁ 87 88 1999-01-01 PERNAMBUCO 102 89 1999-01-01 RONDÔNIA 1 90 1999-01-01 SÃO PAULO 7 91 1999-01-01 TOCANTINS 36 92 1999-02-01 ACRE 0 93 1999-02-01 CEARÁ 16 94 1999-02-01 MATO GROSSO 69 95 1999-02-01 MATO GROSSO DO SUL 28 96 1999-02-01 PERNAMBUCO 13 97 1999-02-01 RONDÔNIA 1 98 1999-02-01 SANTA CATARINA 2 99 1999-02-01 TOCANTINS 1 100 1999-03-01 AMAPÁ 2 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