tablesample.shape

In [ ]:
tablesample.shape()

Computes the dimensions of the tablesample.

Returns

tuple : (number of columns, number of rows)

Example

In [13]:
from verticapy.utilities import tablesample

dataset = tablesample(values = {"index": ["region", "price", "quality"],
                                "Banana": ["Brazil", 2.3, 2],
                                "Manguo": ["Columbia", 6.7, 5],
                                "Apple": ["France", 1.5, 2]},)
display(dataset)
Banana
Manguo
Apple
regionBrazilColumbiaFrance
price2.36.71.5
quality252
Rows: 1-3 | Columns: 4
In [14]:
dataset.shape()
Out[14]:
(4, 3)