tablesample.decimal_to_float

In [ ]:
tablesample.decimal_to_float()

Converts all the tablesample's decimals to floats.

Returns

self : tablesample.

Example

In [11]:
from verticapy.utilities import tablesample
from decimal import Decimal

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