---
title: PySpark data types
description: "PySpark data types in PySpark: This page provides a list of PySpark data types available on Databricks with links to corresponding reference documentation."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/datatypes
---

# PySpark data types

This page provides a list of PySpark data types available on Databricks with links to corresponding reference documentation.

| Data type                                                                                                                                                                 | Description                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [`ArrayType(elementType[, containsNull])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.ArrayType.html)                    | Array data type                                                            |
| [`BinaryType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.BinaryType.html)                                             | Binary (byte array) data type                                              |
| [`BooleanType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.BooleanType.html)                                           | Boolean data type                                                          |
| [`ByteType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.ByteType.html)                                                 | Byte data type, representing signed 8-bit integers                         |
| [`CalendarIntervalType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.CalendarIntervalType.html)                         | Calendar intervals                                                         |
| [`CharType(length)`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.CharType.html)                                           | Char data type                                                             |
| [`DataType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.DataType.html)                                                 | Base class for data types                                                  |
| [`DateType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.DateType.html)                                                 | Date (datetime.date) data type                                             |
| [`DayTimeIntervalType([startField, endField])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.DayTimeIntervalType.html)     | DayTimeIntervalType (datetime.timedelta)                                   |
| [`DecimalType([precision, scale])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.DecimalType.html)                         | Decimal (decimal.Decimal) data type                                        |
| [`DoubleType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.DoubleType.html)                                             | Double data type, representing double precision floats                     |
| [`FileType()`](https://docs.databricks.com/gcp/en/pyspark/reference/file-type.md)                                                                                         | File data type, representing a reference to an unstructured file (Beta)    |
| [`FloatType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.FloatType.html)                                               | Float data type, representing single precision floats                      |
| [`GeographyType`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.GeographyType.html)                                         | Geography data type                                                        |
| [`GeometryType`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.GeometryType.html)                                           | Geometry data type                                                         |
| [`IntegerType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.IntegerType.html)                                           | Int data type, representing signed 32-bit integers                         |
| [`LongType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.LongType.html)                                                 | Long data type, representing signed 64-bit integers                        |
| [`MapType(keyType, valueType[, valueContainsNull])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.MapType.html)            | Map data type                                                              |
| [`NullType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.NullType.html)                                                 | Null type                                                                  |
| [`ShortType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.ShortType.html)                                               | Short data type, representing signed 16-bit integers                       |
| [`StringType([collation])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.StringType.html)                                  | String data type                                                           |
| [`StructField(name, dataType[, nullable, metadata])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.StructField.html)       | A field in StructType                                                      |
| [`StructType([fields])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.StructType.html)                                     | Struct type, consisting of a list of StructField                           |
| [`TimeType(precision)`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.TimeType.html)                                        | Time (datetime.time) data type                                             |
| [`TimestampType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.TimestampType.html)                                       | Timestamp (datetime.datetime) data type                                    |
| [`TimestampNTZType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.TimestampNTZType.html)                                 | Timestamp (datetime.datetime) data type without timezone information       |
| [`VarcharType(length)`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.VarcharType.html)                                     | Varchar data type                                                          |
| [`VariantType()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.VariantType.html)                                           | Variant data type, representing semi-structured values                     |
| [`YearMonthIntervalType([startField, endField])`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.types.YearMonthIntervalType.html) | YearMonthIntervalType, represents year-month intervals of the SQL standard |
