Convert
An intermediate class used in the convert operation.
This class itself does not perform any conversion — it is a transitional step before specifying how to convert the selected columns. It must be followed by one of the conversion methods to produce a new DataFrame with updated column values and types.
The resulting columns will keep their original names and positions in the DataFrame, but their values will be transformed.
Use the following methods to perform the conversion:
to(kType)/to– converts columns to a specific type.<Type>()asColumn { columnConverter }- converts columns using column converter expression.with– applies a custom row-wise conversion expression.perRowCol– applies a conversion that uses both column and row information.asFrame– convertscolumn groupsas aDataFramewith the given expression.toStr,toInt,toLong,toDouble,toFloat,toBigDecimal,toBigInteger,toBoolean– convert to standard types.toLocalDateTime,toLocalDate,toLocalTime– convert to kotlinx.datetime types.toInstant(temporarily deprecated),toStdlibInstant,toDeprecatedInstant– convert toInstanttoDataFrames– converts a column of lists into separate DataFrames.
See Grammar for more details.
Constructors
Functions
Converts values in the columns previously selected with convert to BigDecimal, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to BigInteger, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to DateTimeComponents, preserving their original names and positions within the DataFrame.
Converts values in the columns previously selected with convert to JavaDuration, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to JavaInstant, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the nullable String columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the String columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame.
Converts values in the columns previously selected with convert to JavaLocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the nullable String columns previously selected with convert to JavaLocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to JavaLocalTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the nullable String columns previously selected with convert to JavaLocalTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the String columns previously selected with convert to JavaLocalTime, preserving their original names and positions within the DataFrame.
Converts values in the columns previously selected with convert to LocalDate, preserving their original names and positions within the DataFrame.
Converts values in the DateTimeComponents columns previously selected with convert to LocalDate, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the Int columns previously selected with convert to LocalDate, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the Long columns previously selected with convert to LocalDate, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to LocalDateTime, preserving their original names and positions within the DataFrame.
Converts values in the DateTimeComponents columns previously selected with convert to LocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the Int columns previously selected with convert to LocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the Long columns previously selected with convert to LocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the String columns previously selected with convert to LocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the kotlin.time.Instant columns previously selected with convert to LocalDateTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the columns previously selected with convert to LocalTime, preserving their original names and positions within the DataFrame.
Converts values in the DateTimeComponents columns previously selected with convert to LocalTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the Int columns previously selected with convert to LocalTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the Long columns previously selected with convert to LocalTime, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the String columns previously selected with convert to kotlin.time.Instant, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the kotlinx.datetime.Instant columns previously selected with convert to kotlin.time.Instant, preserving their original names and positions within the DataFrame. Preserves null values.
Converts values in the DateTimeComponents columns previously selected with convert to kotlin.time.Instant, preserving their original names and positions within the DataFrame. Preserves null values.