Dataframe 0.13 Help

cast

Changes the type argument of the DataFrame instance without changing its contents.

cast<T>(verify = false)

Parameters:

  • verify: Boolean = false — when true, the function throws an exception if the DataFrame instance doesn't match the given schema. Otherwise, it just changes the format type without actual data checks.

Use this operation to change the formal type of a DataFrame instance to match the expected schema and enable generated extension properties for it.

@DataSchema interface Person { val age: Int val name: String } df.cast<Person>()

To convert DataFrame columns to match given schema, use convertTo operation.

Last modified: 29 March 2024