tablesample.sort¶
In [ ]:
tablesample.sort(column: str,
desc: bool = False)
Sorts the tablesample using the input column.
In [15]:
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]},).transpose()
display(dataset)
In [16]:
# ASC
dataset.sort("price")
Out[16]:
In [17]:
# DESC
dataset.sort("price", True)
Out[17]: