Dataframe
 
0.15

convert

Edit page Last modified: 14 January 2025

Returns DataFrame with changed values in some columns. Allows changing column types.

See column selectors and row expressions

ColumnGroup can be converted using DataFrame API, for example:

convert supports automatic type conversions between the following types:

  • String (uses parse to convert from String to other types)

  • Boolean

  • Byte

  • Short

  • Int (and Char)

  • Long

  • Float

  • Double

  • BigDecimal

  • BigInteger

  • LocalDateTime (kotlinx.datetime and java.time)

  • LocalDate (kotlinx.datetime and java.time)

  • LocalTime (kotlinx.datetime and java.time)

  • Instant (kotlinx.datetime and java.time)

Automatic conversion from String to enum classes is also supported:

And finally, Value classes can be used with convert too. Both as conversion source and target: