pyspark.sql.types.ArrayType

class pyspark.sql.types.ArrayType(elementType, containsNull=True)[source]

Array data type.

Parameters
  • elementTypeDataType of each element in the array.

  • containsNull – boolean, whether the array can contain null (None) values.

__init__(elementType, containsNull=True)[source]
>>> ArrayType(StringType()) == ArrayType(StringType(), True)
True
>>> ArrayType(StringType(), False) == ArrayType(StringType())
False

Methods

__init__(elementType[, containsNull])

>>> ArrayType(StringType()) == ArrayType(StringType(), True)

fromInternal(obj)

Converts an internal SQL object into a native Python object.

fromJson(json)

json()

jsonValue()

needConversion()

Does this type needs conversion between Python object and internal SQL object.

simpleString()

toInternal(obj)

Converts a Python object into an internal SQL object.

typeName()