メインコンテンツまでスキップ

PySpark データ型

このページでは、Databricks で使用できる PySpark データ型の一覧と、対応するリファレンス ドキュメントへのリンクを示します。

データ型

説明

ArrayType(elementType[, containsNull])

配列データ型

BinaryType()

バイナリ(バイト配列)データ型

BooleanType()

Booleanデータ型

ByteType()

符号付き8ビット整数を表すバイトデータ型

CalendarIntervalType()

カレンダー間隔

CharType(length)

文字データ型

DataType()

データ型の基本クラス

DateType()

日付 (datetime.date)データ型

DayTimeIntervalType([startField, endField])

DayTimeIntervalType (datetime.timedelta)

DecimalType([precision, scale])

10進数(decimal.Decimal)データ型

DoubleType()

倍精度浮動小数点数を表すDoubleデータ型

FloatType()

単精度浮動小数点数を表す浮動小数点データ型

Geography (Databricks のみ)

地理データタイプ

Geometry (Databricks のみ)

ジオメトリデータ型

IntegerType()

符号付き32ビット整数を表すIntデータ型

LongType()

符号付き64ビット整数を表すLongデータ型

MapType(keyType, valueType[, valueContainsNull])

マップデータタイプ

NullType()

ヌル型

ShortType()

符号付き16ビット整数を表すShortデータ型

StringType([collation])

文字列データ型

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

StructTypeのフィールド

StructType([fields])

StructFieldのリストで構成される構造体型

TimestampType()

タイムスタンプ (datetime.datetime)データ型

TimestampNTZType()

タイムスタンプ (datetime.datetime)タイムゾーン情報のないデータ型

VarcharType(length)

Varcharデータ型

VariantType()

半構造化値を表すバリアントデータ型

YearMonthIntervalType([startField, endField])

YearMonthIntervalTypeは、SQL標準の年月間隔を表します。