spooq.transformer.mapper_transformations.to_float

to_float(source_column=None, name=None, **kwargs: Any) Union[partial, Column][source]

Syntactic sugar for calling to_num(cast="float")

Parameters
  • source_column (str or Column) – Input column. Can be a name, pyspark column or pyspark function

  • name (str, default -> derived from input column) – Name of the output column. (.alias(name))

Keyword Arguments

alt_src_cols (str, default -> no coalescing, only source_column) – Coalesce with source_column and columns from this parameter.

Returns

This method returns a suitable type depending on how it was called. This ensures compability with Spooq’s mapper transformer - with or without explicit parameters - as well as direct calls via select, withColumn, where, …

Return type

partial or Column