Array Data Types#
The logical types of the elements of an Array. Each logical type is implemented by a variety of Array encodings which describe both a representation-as-bytes as well as how to apply operations on that representation.
A data type describes the set of operations available on a given column. |
|
Construct a data type for binary strings. |
|
Construct a Boolean data type. |
|
Construct an IEEE 754 binary floating-point data type. |
|
Construct a signed integral data type. |
|
Construct the data type for a column containing only the null value. |
|
Construct an unsigned integral data type. |
|
Construct a UTF-8-encoded string data type. |
- class vortex.dtype.DType#
A data type describes the set of operations available on a given column. These operations are implemented by the column encoding. Each data type is implemented by one or more encodings.
- vortex.dtype.binary(nullable=False)#
Construct a data type for binary strings.
- Parameters:
- Return type:
Examples
A data type permitting any string of bytes but not permitting
None
.>>> vortex.dtype.binary(False) binary(False)
- vortex.dtype.bool(nullable=False)#
Construct a Boolean data type.
- Parameters:
- Return type:
Examples
A data type permitting
None
,True
, andFalse
.>>> vortex.dtype.bool(True) bool(True)
A data type permitting just
True
andFalse
.>>> vortex.dtype.bool(False) bool(False)
- vortex.dtype.float(width=None, nullable=False)#
Construct an IEEE 754 binary floating-point data type.
- Parameters:
- Return type:
Examples
A data type permitting
None
as well as IEEE 754 binary16 floating-point values. Values larger than 65,520 or less than -65,520 will respectively round to positive and negative infinity.>>> vortex.dtype.float(16, False) float(16, False)
- vortex.dtype.int(width=None, nullable=False)#
Construct a signed integral data type.
- Parameters:
- Return type:
Examples
A data type permitting
None
and the integers from -128 to 127, inclusive:>>> vortex.dtype.int(8, True) int(8, True)
A data type permitting just the integers from -2,147,483,648 to 2,147,483,647, inclusive:
>>> vortex.dtype.int(32, False) int(32, False)
- vortex.dtype.null()#
Construct the data type for a column containing only the null value.
- Return type:
Examples
A data type permitting only
None
.>>> vortex.dtype.null() null()
- vortex.dtype.uint(width=None, nullable=False)#
Construct an unsigned integral data type.
- Parameters:
- Return type:
Examples
A data type permitting
None
and the integers from 0 to 255, inclusive:>>> vortex.dtype.uint(8, True) uint(8, True)
A data type permitting just the integers from 0 to 4,294,967,296 inclusive:
>>> vortex.dtype.uint(32, False) uint(32, False)