Data Types#

ArrayType(elementType[, containsNull])

Array data type.

BinaryType()

Binary (byte array) data type.

BooleanType()

Boolean data type.

ByteType()

Byte data type, representing signed 8-bit integers.

DataType()

Base class for data types.

DateType()

Date (datetime.date) data type.

DecimalType([precision, scale])

Decimal (decimal.Decimal) data type.

DoubleType()

Double data type, representing double precision floats.

FloatType()

Float data type, representing single precision floats.

IntegerType()

Int data type, representing signed 32-bit integers.

LongType()

Long data type, representing signed 64-bit integers.

MapType(keyType, valueType[, valueContainsNull])

Map data type.

NullType()

Null type.

ShortType()

Short data type, representing signed 16-bit integers.

StringType([collation])

String data type.

CharType(length)

Char data type

VarcharType(length)

Varchar data type

StructField(name, dataType[, nullable, metadata])

A field in StructType.

StructType([fields])

Struct type, consisting of a list of StructField.

VariantType()

Variant data type, representing semi-structured values.

TimestampType()

Timestamp (datetime.datetime) data type.

TimestampNTZType()

Timestamp (datetime.datetime) data type without timezone information.

DayTimeIntervalType([startField, endField])

DayTimeIntervalType (datetime.timedelta).

YearMonthIntervalType([startField, endField])

YearMonthIntervalType, represents year-month intervals of the SQL standard

CalendarIntervalType()

The data type representing calendar intervals.