vDataFrame.describe

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

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

Parameters

Name Type Optional Description
method
str
The describe method.
  • all : Aggregates all statistics for all vColumns. The exact method depends on the vColumn type (numerical datatype: numerical; timestamp datatype: range; categorical datatype: length).
  • auto : Sets the method to 'numerical' if at least one vColumn of the vDataFrame is numerical and uses 'categorical' otherwise.
  • categorical : Only uses categorical aggregations during the computation.
  • length : Aggregates the vDataFrame using numerical aggregation on the length of all the selected vcolumns.
  • numerical : Only uses numerical descriptive statistics. These are computed more quickly than with the 'aggregate' method.
  • range : Aggregates the vDataFrame using multiple statistical aggregations (min, max, range, etc.).
  • statistics : Aggregates the vDataFrame using multiple statistical aggregations (kurtosis, skewness, min, max, etc.).
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
The number of columns used per query. Setting this parameter divides what would otherwise be one large query into many smaller queries called "blocks," the size of which is determined by the ncols_block parameter.
processes
int
Number of child processes to create. Setting this with the ncols_block parameter lets you parallelize a single query into many smaller queries, where each child process creates its own connection to the database and sends one query. This can improve query performance, but consumes more resources. If processes is set to 1, the queries are sent iteratively from a single process.

Returns

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

Example

In [1]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic)
123
pclass
Int
123
survived
Int
Abc
Varchar(164)
Abc
sex
Varchar(20)
123
age
Numeric(6,3)
123
sibsp
Int
123
parch
Int
Abc
ticket
Varchar(36)
123
fare
Numeric(10,5)
Abc
cabin
Varchar(30)
Abc
embarked
Varchar(20)
Abc
boat
Varchar(100)
123
body
Int
Abc
home.dest
Varchar(100)
110female2.012113781151.55C22 C26S[null][null]Montreal, PQ / Chesterville, ON
210male30.012113781151.55C22 C26S[null]135Montreal, PQ / Chesterville, ON
310female25.012113781151.55C22 C26S[null][null]Montreal, PQ / Chesterville, ON
410male39.0001120500.0A36S[null][null]Belfast, NI
510male71.000PC 1760949.5042[null]C[null]22Montevideo, Uruguay
610male47.010PC 17757227.525C62 C64C[null]124New York, NY
710male[null]00PC 1731825.925[null]S[null][null]New York, NY
810male24.001PC 17558247.5208B58 B60C[null][null]Montreal, PQ
910male36.0001305075.2417C6CA[null]Winnipeg, MN
1010male25.0001390526.0[null]C[null]148San Francisco, CA
1110male45.00011378435.5TS[null][null]Trenton, NJ
1210male42.00011048926.55D22S[null][null]London / Winnipeg, MB
1310male41.00011305430.5A21S[null][null]Pomeroy, WA
1410male48.000PC 1759150.4958B10C[null]208Omaha, NE
1510male[null]0011237939.6[null]C[null][null]Philadelphia, PA
1610male45.00011305026.55B38S[null][null]Washington, DC
1710male[null]0011379831.0[null]S[null][null][null]
1810male33.0006955.0B51 B53 B55S[null][null]New York, NY
1910male28.00011305947.1[null]S[null][null]Montevideo, Uruguay
2010male17.00011305947.1[null]S[null][null]Montevideo, Uruguay
2110male49.0001992426.0[null]S[null][null]Ascot, Berkshire / Rochester, NY
2210male36.0101987778.85C46S[null]172Little Onn Hall, Staffs
2310male46.010W.E.P. 573461.175E31S[null][null]Amenia, ND
2410male[null]001120510.0[null]S[null][null]Liverpool, England / Belfast
2510male27.01013508136.7792C89C[null][null]Los Angeles, CA
2610male[null]0011046552.0A14S[null][null]Stoughton, MA
2710male47.000572725.5875E58S[null][null]Victoria, BC
2810male37.011PC 1775683.1583E52C[null][null]Lakewood, NJ
2910male[null]0011379126.55[null]S[null][null]Roachdale, IN
3010male70.011WE/P 573571.0B22S[null]269Milwaukee, WI
3110male39.010PC 1759971.2833C85C[null][null]New York, NY
3210male31.010F.C. 1275052.0B71S[null][null]Montreal, PQ
3310male50.010PC 17761106.425C86C[null]62Deephaven, MN / Cedar Rapids, IA
3410male39.000PC 1758029.7A18C[null]133Philadelphia, PA
3510female36.000PC 1753131.6792A29C[null][null]New York, NY
3610male[null]00PC 17483221.7792C95S[null][null][null]
3710male30.00011305127.75C111C[null][null]New York, NY
3810male19.03219950263.0C23 C25 C27S[null][null]Winnipeg, MB
3910male64.01419950263.0C23 C25 C27S[null][null]Winnipeg, MB
4010male[null]0011377826.55D34S[null][null]Westcliff-on-Sea, Essex
4110male[null]001120580.0B102S[null][null][null]
4210male37.01011380353.1C123S[null][null]Scituate, MA
4310male47.00011132038.5E63S[null]275St Anne's-on-Sea, Lancashire
4410male24.000PC 1759379.2B86C[null][null][null]
4510male71.000PC 1775434.6542A5C[null][null]New York, NY
4610male38.001PC 17582153.4625C91S[null]147Winnipeg, MB
4710male46.000PC 1759379.2B82 B84C[null][null]New York, NY
4810male[null]0011379642.4[null]S[null][null][null]
4910male45.0103697383.475C83S[null][null]New York, NY
5010male40.0001120590.0B94S[null]110[null]
5110male55.0111274993.5B69S[null]307Montreal, PQ
5210male42.00011303842.5B11S[null][null]London / Middlesex
5310male[null]001746351.8625E46S[null][null]Brighton, MA
5410male55.00068050.0C39S[null][null]London / Birmingham
5510male42.01011378952.0[null]S[null]38New York, NY
5610male[null]00PC 1760030.6958[null]C14[null]New York, NY
5710female50.000PC 1759528.7125C49C[null][null]Paris, France New York, NY
5810male46.00069426.0[null]S[null]80Bennington, VT
5910male50.00011304426.0E60S[null][null]London
6010male32.500113503211.5C132C[null]45[null]
6110male58.0001177129.7B37C[null]258Buffalo, NY
6210male41.0101746451.8625D21S[null][null]Southington / Noank, CT
6310male[null]0011302826.55C124S[null][null]Portland, OR
6410male[null]00PC 1761227.7208[null]C[null][null]Chicago, IL
6510male29.00011350130.0D6S[null]126Springfield, MA
6610male30.00011380145.5[null]S[null][null]London / New York, NY
6710male30.00011046926.0C106S[null][null]Brockton, MA
6810male19.01011377353.1D30S[null][null]New York, NY
6910male46.0001305075.2417C6C[null]292Vancouver, BC
7010male54.0001746351.8625E46S[null]175Dorchester, MA
7110male28.010PC 1760482.1708[null]C[null][null]New York, NY
7210male65.0001350926.55E38S[null]249East Bridgewater, MA
7310male44.0201992890.0C78Q[null]230Fond du Lac, WI
7410male55.00011378730.5C30S[null][null]Montreal, PQ
7510male47.00011379642.4[null]S[null][null]Washington, DC
7610male37.001PC 1759629.7C118C[null][null]Brooklyn, NY
7710male58.00235273113.275D48C[null]122Lexington, MA
7810male64.00069326.0[null]S[null]263Isle of Wight, England
7910male65.00111350961.9792B30C[null]234Providence, RI
8010male28.500PC 1756227.7208D43C[null]189?Havana, Cuba
8110male[null]001120520.0[null]S[null][null]Belfast
8210male45.50011304328.5C124S[null]166Surbiton Hill, Surrey
8310male23.0001274993.5B24S[null][null]Montreal, PQ
8410male29.01011377666.6C2S[null][null]Isleworth, England
8510male18.010PC 17758108.9C65C[null][null]Madrid, Spain
8610male47.00011046552.0C110S[null]207Worcester, MA
8710male38.000199720.0[null]S[null][null]Rotterdam, Netherlands
8810male22.000PC 17760135.6333[null]C[null]232[null]
8910male[null]00PC 17757227.525[null]C[null][null][null]
9010male31.000PC 1759050.4958A24S[null][null]Trenton, NJ
9110male[null]0011376750.0A32S[null][null]Seattle, WA
9210male36.0001304940.125A10C[null][null]Winnipeg, MB
9310male55.010PC 1760359.4[null]C[null][null]New York, NY
9410male33.00011379026.55[null]S[null]109London
9510male61.013PC 17608262.375B57 B59 B63 B66C[null][null]Haverford, PA / Cooperstown, NY
9610male50.0101350755.9E44S[null][null]Duluth, MN
9710male56.00011379226.55[null]S[null][null]New York, NY
9810male56.0001776430.6958A7C[null][null]St James, Long Island, NY
9910male24.0101369560.0C31S[null][null]Huntington, WV
10010male[null]0011305626.0A19S[null][null]Streatham, Surrey
Rows: 1-100 | Columns: 14
In [2]:
# All statistics
titanic.describe(method = "all")
Out[2]:
123
"pclass"
Int
100%
123
"survived"
Int
100%
123
"age"
Numeric(6,3)
80%
123
"sibsp"
Int
100%
123
"parch"
Int
100%
123
"fare"
Numeric(10,5)
99%
123
"body"
Int
9%
Abc
"name"
Varchar(164)
100%
Abc
"sex"
Varchar(20)
100%
Abc
"ticket"
Varchar(36)
100%
Abc
"cabin"
Varchar(30)
23%
Abc
"embarked"
Varchar(20)
99%
Abc
"boat"
Varchar(100)
35%
Abc
"home.dest"
Varchar(100)
57%
dtypeintintnumeric(6,3)intintnumeric(10,5)intvarchar(164)varchar(20)varchar(36)varchar(30)varchar(20)varchar(100)varchar(100)
percent100.0100.080.794100.0100.099.9199.562100.0100.0100.023.17799.83835.57557.212
count123412349971234123412331181234123412342861232439706
top30[null]008.05[null]Kelly, Mr. JamesmaleCA. 2343[null]S[null][null]
top_percent53.72863.53319.20667.74776.9044.790.4380.16265.9640.8176.82370.74664.42542.788
avg2.284440842787680.36466774716369530.15245737211630.5040518638573740.37844408427876833.9637936739659164.1440677966126.51458670988654.68071312803896.804700162074553.720279720279721.01.4738041002277919.0453257790368
stddev0.8424856361902920.48153201864128814.43530462991591.041117272416290.86860470779039252.646072983129396.57602075578089.183372851718240.9480423216670232.802491756972612.283136022430690.00.636501473619058.83212620482592
min100.33000.0112431115
approx_25%1.00.021.00.00.07.895879.25204531112
approx_50%3.00.028.00.00.014.4542160.5254631117
approx_75%3.01.039.01.00.031.3875257.5306731225
max3180.089512.329232882618151750
range2179.6789512.329232770215140645
empty[null][null][null][null][null][null][null]0000000
Rows: 1-14 | Columns: 15
In [3]:
# Categorical 
titanic.describe(method = "categorical")
Out[3]:
dtype
count
top
top_percent
"pclass"int1234353.728
"survived"int1234063.533
"name"varchar(164)1234Kelly, Mr. James0.162
"sex"varchar(20)1234male65.964
"age"numeric(6,3)997[null]19.206
"sibsp"int1234067.747
"parch"int1234076.904
"ticket"varchar(36)1234CA. 23430.81
"fare"numeric(10,5)12338.054.7
"cabin"varchar(30)286[null]76.823
"embarked"varchar(20)1232S70.746
"boat"varchar(100)439[null]64.425
"body"int118[null]90.438
"home.dest"varchar(100)706[null]42.788
Rows: 1-14 | Columns: 5
In [4]:
# Length
titanic.describe(method = "length")
Out[4]:
dtype
percent
count
empty
avg_length
stddev_length
min_length
25%_length
50%_length
75%_length
max_length
"pclass"int100123401.00.011111
"survived"int100123401.00.011111
"name"varchar(164)1001234026.51458670988659.183372851718241220253082
"sex"varchar(20)100123404.68071312803890.94804232166702344466
"age"numeric(6,3)80.79499705.925777331995990.26226447182266356666
"sibsp"int100123401.00.011111
"parch"int100123401.00.011111
"ticket"varchar(36)100123406.804700162074552.80249175697261356718
"fare"numeric(10,5)99.919123307.691808596918090.59001930605442277889
"cabin"varchar(30)23.17728603.720279720279722.28313602243069133315
"embarked"varchar(20)99.838123201.00.011111
"boat"varchar(100)35.57543901.473804100227790.6365014736190511127
"body"int9.56211802.661016949152540.54255393182709512333
"home.dest"varchar(100)57.212706019.04532577903688.83212620482592512172550
Rows: 1-14 | Columns: 12
In [5]:
# Numerical
titanic.describe(method = "numerical")
Out[5]:
count
mean
std
min
approx_25%
approx_50%
approx_75%
max
"pclass"12342.284440842787680.84248563619029211333
"survived"12340.3646677471636950.48153201864128800011
"age"99730.152457372116314.43530462991590.3321283980
"sibsp"12340.5040518638573741.0411172724162900018
"parch"12340.3784440842787680.86860470779039200009
"fare"123333.963793673965952.646072983129307.895814.454231.3875512.3292
"body"118164.1440677966196.5760207557808179.25160.5257.5328
Rows: 1-7 | Columns: 9
In [6]:
# Range
titanic.describe(method = "range")
Out[6]:
dtype
percent
count
min
max
range
"pclass"int1001234132
"survived"int1001234011
"age"numeric(6,3)80.7949970.338079.67
"sibsp"int1001234088
"parch"int1001234099
"fare"numeric(10,5)99.91912330512.3292512.3292
"body"int9.5621181328327
Rows: 1-7 | Columns: 7
In [7]:
# Statistics
titanic.describe(method = "statistics")
Out[7]:
dtype
percent
count
avg<