llms.txt: machine-readable documentation index. Markdown version of this page is also available.

DataFrame Help

Adjust schema

The DataFrame interface has type argument T that doesn't affect the contents of DataFrame, but marks DataFrame with a type that represents the data schema that this DataFrame is supposed to have. This argument is used to generate extension properties for typed data access.

API reference: cast, convertTo

Another place where this argument has a special role is in interop with data classes:

Actual data in DataFrame may diverge from compile-time schema marker T due to dynamic nature of data inside DataFrame. However, at some points of code you may know exactly what DataFrame schema is expected. To match your knowledge with expected real-time DataFrame contents you can use one of two functions:

Alternatively, use requireColumn to incrementally add type information to compile time schema.

02 November 2026