Cast to Float
Description
Converts a value to the float type.
Category
Transformation
Supported Field Types
- text
- int
- boolean
Output Field Type
- float
Arguments
None
Pseudo-code (Python)
def func(val):
"""
val: original value
"""
if val:
return float(val)
else:
return None
Use Cast to Float in Kondado
Apply the Cast to Float transformation to convert text, integer, or boolean fields into float format for your data pipelines.
Access your pipeline transformations
Open your pipeline in the data transformation section of the Kondado platform to add or edit transformations.
Select the source field to convert
Choose a field of type text, int, or boolean that you want to convert to float format for calculations or reporting.
Apply the Cast to Float function
Add the Cast to Float transformation with no arguments required; the function automatically converts valid values to float and returns None for empty values.
Verify output and connect to destination
Confirm the output field type is float, then send your transformed data to a destination such as a BI tool, warehouse, or spreadsheet.