Loading...

verticapy.vDataFrame.expected_store_usage#

vDataFrame.expected_store_usage(unit: str = 'b') TableSample#

Returns the vDataFrame expected store usage.

Parameters#

unit: str, optional

Unit used for the computation. b : byte kb: kilo byte gb: giga byte tb: tera byte

Returns#

TableSample

result.

Examples#

Let’s begin by importing 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 from verticapy are used as intended without interfering with functions from other libraries.

Let us create a dummy dataset and check its expected storage:

vdf = vp.vDataFrame({"val": [0, 10, 20]})
123
val
Integer
100%
10
210
320

We can check the expected storage of the vDataFrame using:

vdf.expected_store_usage()
...
max_size (b)
type
"pclass"...7952.0int
"survived"...7952.0int
"name"...163016.0varchar(164)
"sex"...19880.0varchar(20)
"age"...8946.0numeric(6,3)
"sibsp"...7952.0int
"parch"...7952.0int
"ticket"...35784.0varchar(36)
"fare"...14910.0numeric(10,5)
"cabin"...7830.0varchar(30)
"embarked"...19880.0varchar(20)
"boat"...38000.0varchar(100)
"body"...928.0int
"home.dest"...64800.0varchar(100)
separator...13916.0
header...116.0
rawsize...419814.0

See also

vDataFrame.memory_usage() : vDataFrame memory usage
vDataFrame.explain() : Information on how Vertica is computing the current vDataFrame relation.