vDataFrame.describe

In [ ]:
vDataFrame.describe(method: str = "auto", 
                    columns: list = [], 
                    unique: bool = True,
                    ncols_block: int = 20,)

Aggregates the vDataFrame using multiple statistical aggregations: min, max, median, unique... depending on the types of the vColumns.

Parameters

Name Type Optional Description
method
str
The describe method.
  • all : Aggregates all the selected vDataFrame vcolumns different methods depending on the vcolumn type (numerical dtype: numerical; timestamp dtype: range; categorical dtype: length)
  • auto : Sets the method to 'numerical' if at least one vcolumn of the vDataFrame is numerical, 'categorical' otherwise.
  • categorical : Uses only categorical aggregations during the computation.
  • length : Aggregates the vDataFrame using numerical aggregation on the length of all the selected vcolumns.
  • numerical : Uses only numerical descriptive statistics which are computed in a faster way than the 'aggregate' method.
  • range : Aggregates the vDataFrame using multiple statistical aggregations - min, max, range...
  • statistics : Aggregates the vDataFrame using multiple statistical aggregations - kurtosis, skewness, min, max...
columns
list
List of the vcolumns names. If empty, the vcolumns will be selected depending on the parameter 'method'.
unique
bool
If set to True, the cardinality of each element will be computed.
ncols_block
int
Number of columns used per query. For query performance, it is better to pick up a balanced number. A small number will lead to the generation of multiple queries. A higher number will lead to the generation of one big SQL query.

Returns

tablesample : An object containing the result. For more information, see utilities.tablesample.

Example

In [5]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic)
123
pclass
Int
123
survived
Int
Abc
Varchar(96)
Abc
gender
Char(1)
123
age
Numeric(6,3)
123
sibsp
Int
123
parch
Int
Abc
ticket
Varchar(24)
123
fare
Numeric(7,4)
Abc
cabin
Char(10)
Abc
embarked
Char(1)
Abc
boat
Char(4)
123
body
Int
Abc
homedest
Varchar(64)
123
split
Float
110f2.00012113781151.5500C22 C26 S[null][null]Montreal, PQ / Chesterville, ON0.815318015636876
210m30.00012113781151.5500C22 C26 S[null]135Montreal, PQ / Chesterville, ON0.514822213212028
310f25.00012113781151.5500C22 C26 S[null][null]Montreal, PQ / Chesterville, ON0.142754525179043
410m39.000001120500.0000A36 S[null][null]Belfast, NI0.0399594560731202
510m71.00000PC 1760949.5042[null]C[null]22Montevideo, Uruguay0.402364013250917
610m47.00010PC 17757227.5250C62 C64 C[null]124New York, NY0.635426498716697
710m[null]00PC 1731825.9250[null]S[null][null]New York, NY0.597051517339423
810m24.00001PC 17558247.5208B58 B60 C[null][null]Montreal, PQ0.00836621411144733
910m36.000001305075.2417C6 CA [null]Winnipeg, MN0.111589096253738
1010m25.000001390526.0000[null]C[null]148San Francisco, CA0.886645357124507
1110m45.0000011378435.5000T S[null][null]Trenton, NJ0.107878888258711
1210m42.0000011048926.5500D22 S[null][null]London / Winnipeg, MB0.358096122043207
1310m41.0000011305430.5000A21 S[null][null]Pomeroy, WA0.0518329064361751
1410m48.00000PC 1759150.4958B10 C[null]208Omaha, NE0.200647147372365
1510m[null]0011237939.6000[null]C[null][null]Philadelphia, PA0.720063246553764
1610m45.0000011305026.5500B38 S[null][null]Washington, DC0.917834898689762
1710m[null]0011379831.0000[null]S[null][null][null]0.947958540637046
1810m33.000006955.0000B51 B53 B5S[null][null]New York, NY0.533363076625392
1910m28.0000011305947.1000[null]S[null][null]Montevideo, Uruguay0.200074948370457
2010m17.0000011305947.1000[null]S[null][null]Montevideo, Uruguay0.993818185292184
2110m49.000001992426.0000[null]S[null][null]Ascot, Berkshire / Rochester, NY0.137975917430595
2210m36.000101987778.8500C46 S[null]172Little Onn Hall, Staffs0.619254318298772
2310m46.00010W.E.P. 573461.1750E31 S[null][null]Amenia, ND0.355981041444466
2410m[null]001120510.0000[null]S[null][null]Liverpool, England / Belfast0.17994736135006
2510m27.0001013508136.7792C89 C[null][null]Los Angeles, CA0.775647930568084
2610m[null]0011046552.0000A14 S[null][null]Stoughton, MA0.935470992932096
2710m47.00000572725.5875E58 S[null][null]Victoria, BC0.568378621246666
2810m37.00011PC 1775683.1583E52 C[null][null]Lakewood, NJ0.607994917081669
2910m[null]0011379126.5500[null]S[null][null]Roachdale, IN0.705552167724818
3010m70.00011WE/P 573571.0000B22 S[null]269Milwaukee, WI0.185576476156712
3110m39.00010PC 1759971.2833C85 C[null][null]New York, NY0.516148791648448
3210m31.00010F.C. 1275052.0000B71 S[null][null]Montreal, PQ0.851567223668098
3310m50.00010PC 17761106.4250C86 C[null]62Deephaven, MN / Cedar Rapids, IA0.632833027513698
3410m39.00000PC 1758029.7000A18 C[null]133Philadelphia, PA0.72644979134202
3510f36.00000PC 1753131.6792A29 C[null][null]New York, NY0.847605429124087
3610m[null]00PC 17483221.7792C95 S[null][null][null]0.74904768075794
3710m30.0000011305127.7500C111 C[null][null]New York, NY0.431305234320462
3810m19.0003219950263.0000C23 C25 C2S[null][null]Winnipeg, MB0.0793363316915929
3910m64.0001419950263.0000C23 C25 C2S[null][null]Winnipeg, MB0.388494573766366
4010m[null]0011377826.5500D34 S[null][null]Westcliff-on-Sea, Essex0.142541378969327
4110m[null]001120580.0000B102 S[null][null][null]0.954079678747803
4210m37.0001011380353.1000C123 S[null][null]Scituate, MA0.937022707192227
4310m47.0000011132038.5000E63 S[null]275St Anne's-on-Sea, Lancashire0.371648256899789
4410m24.00000PC 1759379.2000B86 C[null][null][null]0.665388232795522
4510m71.00000PC 1775434.6542A5 C[null][null]New York, NY0.741307334508747
4610m38.00001PC 17582153.4625C91 S[null]147Winnipeg, MB0.345036457292736
4710m46.00000PC 1759379.2000B82 B84 C[null][null]New York, NY0.837107699597254
4810m[null]0011379642.4000[null]S[null][null][null]0.778836605837569
4910m45.000103697383.4750C83 S[null][null]New York, NY0.452243909239769
5010m40.000001120590.0000B94 S[null]110[null]0.0371354282833636
5110m55.000111274993.5000B69 S[null]307Montreal, PQ0.563097916543484
5210m42.0000011303842.5000B11 S[null][null]London / Middlesex0.754689895315096
5310m[null]001746351.8625E46 S[null][null]Brighton, MA0.46268887934275
5410m55.0000068050.0000C39 S[null][null]London / Birmingham0.569614446721971
5510m42.0001011378952.0000[null]S[null]38New York, NY0.701291786506772
5610m[null]00PC 1760030.6958[null]C14 [null]New York, NY0.589644859079272
5710f50.00000PC 1759528.7125C49 C[null][null]Paris, France New York, NY0.49467936810106
5810m46.0000069426.0000[null]S[null]80Bennington, VT0.779803531477228
5910m50.0000011304426.0000E60 S[null][null]London0.334872611565515
6010m32.50000113503211.5000C132 C[null]45[null]0.561064395355061
6110m58.000001177129.7000B37 C[null]258Buffalo, NY0.628222591010854
6210m41.000101746451.8625D21 S[null][null]Southington / Noank, CT0.356504800729454
6310m[null]0011302826.5500C124 S[null][null]Portland, OR0.599147979635745
6410m[null]00PC 1761227.7208[null]C[null][null]Chicago, IL0.578147665364668
6510m29.0000011350130.0000D6 S[null]126Springfield, MA0.19623118150048
6610m30.0000011380145.5000[null]S[null][null]London / New York, NY0.94992582895793
6710m30.0000011046926.0000C106 S[null][null]Brockton, MA0.363202170934528
6810m19.0001011377353.1000D30 S[null][null]New York, NY0.827336158370599
6910m46.000001305075.2417C6 C[null]292Vancouver, BC0.285753501113504
7010m54.000001746351.8625E46 S[null]175Dorchester, MA0.688862106297165
7110m28.00010PC 1760482.1708[null]C[null][null]New York, NY0.728661807486787
7210m65.000001350926.5500E38 S[null]249East Bridgewater, MA0.617859082994983
7310m44.000201992890.0000C78 Q[null]230Fond du Lac, WI0.954004928469658
7410m55.0000011378730.5000C30 S[null][null]Montreal, PQ0.503857570467517
7510m47.0000011379642.4000[null]S[null][null]Washington, DC0.154437867924571
7610m37.00001PC 1759629.7000C118 C[null][null]Brooklyn, NY0.22336406307295
7710m58.0000235273113.2750D48 C[null]122Lexington, MA0.878490646136925
7810m64.0000069326.0000[null]S[null]263Isle of Wight, England0.305325420340523
7910m65.0000111350961.9792B30 C[null]234Providence, RI0.524437925312668
8010m28.50000PC 1756227.7208D43 C[null]189?Havana, Cuba0.666664712131023
8110m[null]001120520.0000[null]S[null][null]Belfast0.364063322544098
8210m45.5000011304328.5000C124 S[null]166Surbiton Hill, Surrey0.396239920286462
8310m23.000001274993.5000B24 S[null][null]Montreal, PQ0.323091795900837
8410m29.0001011377666.6000C2 S[null][null]Isleworth, England0.835115849273279
8510m18.00010PC 17758108.9000C65 C[null][null]Madrid, Spain0.19482533656992
8610m47.0000011046552.0000C110 S[null]207Worcester, MA0.2082355087623
8710m38.00000199720.0000[null]S[null][null]Rotterdam, Netherlands0.746992202242836
8810m22.00000PC 17760135.6333[null]C[null]232[null]0.186588425887749
8910m[null]00PC 17757227.5250[null]C[null][null][null]0.577199265360832
9010m31.00000PC 1759050.4958A24 S[null][null]Trenton, NJ0.212681184988469
9110m[null]0011376750.0000A32 S[null][null]Seattle, WA0.149814031785354
9210m36.000001304940.1250A10 C[null][null]Winnipeg, MB0.0017111434135586
9310m55.00010PC 1760359.4000[null]C[null][null]New York, NY0.879928017500788
9410m33.0000011379026.5500[null]S[null]109London0.626925394171849
9510m61.00013PC 17608262.3750B57 B59 B6C[null][null]Haverford, PA / Cooperstown, NY0.725577870383859
9610m50.000101350755.9000E44 S[null][null]Duluth, MN0.521040184423327
9710m56.0000011379226.5500[null]S[null][null]New York, NY0.833983679767698
9810m56.000001776430.6958A7 C[null][null]St James, Long Island, NY0.972882559057325
9910m24.000101369560.0000C31 S[null][null]Huntington, WV0.335882832761854
10010m[null]0011305626.0000A19 S[null][null]Streatham, Surrey0.620575522771105
Rows: 1-100 of 1234 | Columns: 15
In [21]:
titanic.describe(method = "all")
123
"fare"
Numeric(10,5)
99%
123
"survived"
Int
100%
123
"pclass"
Int
100%
123
"age"
Numeric(6,3)
80%
123
"body"
Int
9%
123
"parch"
Int
100%
123
"sibsp"
Int
100%
Abc
"sex"
Varchar(20)
100%
Abc
"boat"
Varchar(100)
35%
Abc
"ticket"
Varchar(36)
100%
Abc
"name"
Varchar(164)
100%
Abc
"embarked"
Varchar(20)
99%
Abc
"cabin"
Varchar(30)
23%
Abc
"home.dest"
Varchar(100)
57%
count123312341234997118123412341234439123412341232286706
unique27723961188722688712323182359
top8.0503[null][null]00male[null]CA. 2343Kelly, Mr. JamesS[null][null]
top_percent4.763.53353.72819.20690.43876.90467.74765.96464.4250.810.16270.74676.82342.788
avg33.96379367396590.3646677471636952.2844408427876830.1524573721163164.144067796610.3784440842787680.5040518638573744.68071312803891.473804100227796.8047001620745526.51458670988651.03.7202797202797219.0453257790368
stddev52.64607298312930.4815320186412880.84248563619029214.435304629915996.57602075578080.8686047077903921.041117272416290.9480423216670230.636501473619052.802491756972619.183372851718240.02.283136022430698.83212620482592
min0.00000010.33010041312115
25%7.89580.01.021.079.250.00.0415201312
50%14.45420.03.028.0160.50.00.0416251317
75%31.38751.03.039.0257.50.01.0627301325
max512.329201380.0003289867188211550
range512.329201279.6703279826157001445
empty[null][null][null][null][null][null][null]0000000
Out[21]:

In [22]:
titanic.describe(method = "categorical")
dtypeuniquecounttoptop_percent
"fare"numeric(10,5)27712338.054.7
"survived"int21234063.533
"sex"varchar(20)21234male65.964
"boat"varchar(100)26439[null]64.425
"pclass"int31234353.728
"age"numeric(6,3)96997[null]19.206
"ticket"varchar(36)8871234CA. 23430.81
"name"varchar(164)12321234Kelly, Mr. James0.162
"embarked"varchar(20)31232S70.746
"cabin"varchar(30)182286[null]76.823
"body"int118118[null]90.438
"parch"int81234076.904
"home.dest"varchar(100)359706[null]42.788
"sibsp"int71234067.747
Out[22]:

In [23]:
titanic.describe(method = "length")
dtypepercentcountuniqueemptyavg_lengthstddev_lengthmin_length25%_length50%_length75%_lengthmax_length
"fare"numeric(10,5)99.919123327707.691808596918090.59001930605442277889
"survived"int1001234201.00.011111
"sex"varchar(20)1001234204.68071312803890.94804232166702344466
"boat"varchar(100)35.5754392601.473804100227790.6365014736190511127
"pclass"int1001234301.00.011111
"age"numeric(6,3)80.7949979605.925777331995990.26226447182266356666
"ticket"varchar(36)100123488706.804700162074552.80249175697261356718
"name"varchar(164)10012341232026.51458670988659.183372851718241220253082
"embarked"varchar(20)99.8381232301.00.011111
"cabin"varchar(30)23.17728618203.720279720279722.28313602243069133315
"body"int9.56211811802.661016949152540.54255393182709512333
"parch"int1001234801.00.011111
"home.dest"varchar(100)57.212706359019.04532577903688.83212620482592512172550
"sibsp"int1001234701.00.011111
Out[23]:

In [24]:
titanic.describe(method = "numerical")
countmeanstdmin25%50%75%maxunique
fare123333.963793673965952.646072983129307.895814.454231.3875512.3292277.0
survived12340.3646677471636950.481532018641288000112.0
pclass12342.284440842787680.842485636190292113333.0
age99730.152457372116314.43530462991590.332128398096.0
body118164.1440677966196.5760207557808179.25160.5257.5328118.0
parch12340.3784440842787680.868604707790392000098.0
sibsp12340.5040518638573741.04111727241629000187.0
Out[24]:

In [25]:
titanic.describe(method = "range")
dtypepercentcountuniqueminmaxrange
"fare"numeric(10,5)99.91912332770512.3292512.3292
"survived"int10012342011
"pclass"int10012343132
"age"numeric(6,3)80.794997960.338079.67
"body"int9.5621181181328327
"parch"int10012348099
"sibsp"int10012347088
Out[25]:

In [26]:
titanic.describe(method = "statistics")