ColumnSchema

sealed class ColumnSchema

Describes a single column of a DataFrameSchema: what kind of column it is, what type it holds, and, for the two nested kinds, the schema of what is inside it.

There is one subclass per column kind:

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
class Frame(val schema: DataFrameSchema, val nullable: Boolean, val contentType: KType?) : ColumnSchema

The schema of a frame column.

Link copied to clipboard
class Group(val schema: DataFrameSchema, val contentType: KType?) : ColumnSchema

The schema of a column group.

Link copied to clipboard
class Value(val type: KType) : ColumnSchema

The schema of a value column.

Properties

Link copied to clipboard
abstract val contentType: KType?

The type associated with the contents of the column. For Value this is irrelevant and thus null. Use type instead. For Group this is the common base type associated with all the DataRows in the column. For Frame this is the common base type associated with all the DataFrames in the column.

Link copied to clipboard
abstract val kind: ColumnKind

Either Value or Group or Frame.

Link copied to clipboard
abstract val nullable: Boolean

Whether the column is nullable. Is always false for Group.

Link copied to clipboard
abstract val type: KType

The type of the column. For Value this is the common base type associated with all the values in the column. For Group this is AnyRow. For Frame this is AnyFrame.

Functions

Link copied to clipboard
fun compare(other: ColumnSchema, comparisonMode: ComparisonMode = LENIENT): CompareResult

Compares this column schema with the other column schema.

Link copied to clipboard

Create "empty" column based on the toplevel of this ColumnSchema.

Link copied to clipboard
internal fun ColumnSchema.createNullFilledColumn(name: String, numberOfRows: Int): AnyCol

Creates a column based on this ColumnSchema filled with null or empty dataframes.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks equality by kind, type, or schema

Link copied to clipboard
open override fun hashCode(): Int