| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../api/../generated/pyarrow.types.TypesEnum.html | [Back] [Original] |
Bases: IntEnum
An Enum that maps constant values to data types. Exposes the underlying data types representation for type checking purposes. Note that some of the types listed here are not supported by PyArrow yet: INTERVAL_MONTHS and INTERVAL_DAY_TIME.
Examples
>>> import pyarrow as pa
>>> from pyarrow.types import TypesEnum
>>> int8_field = pa.field('int8_field', pa.int8())
>>> int8_field.type.id == TypesEnum.INT8
True
>>> fixed_size_list = pa.list_(pa.uint16(), 3)
>>> fixed_size_list.id == TypesEnum.LIST
False
>>> fixed_size_list.id == TypesEnum.FIXED_SIZE_LIST
True
Methods
|
Returns self, the complex conjugate of any int. |
|
Number of bits necessary to represent self in binary. |
|
Number of ones in the binary representation of the absolute value of self. |
|
Return an array of bytes representing an integer. |
|
Return the integer represented by the given array of bytes. |
Return a pair of integers, whose ratio is equal to the original int. |
|
|
Returns True. |
|
Attributes
the real part of a complex number |
|
the imaginary part of a complex number |
|
the numerator of a rational number in lowest terms |
|
the denominator of a rational number in lowest terms |
|
Return a pair of integers, whose ratio is equal to the original int.
The ratio is in lowest terms and has a positive denominator.
>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
Number of bits necessary to represent self in binary.
>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
Returns self, the complex conjugate of any int.
the denominator of a rational number in lowest terms
Return the integer represented by the given array of bytes.
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
The byte order used to represent the integer. If byteorder is big, the most significant byte is at the beginning of the byte array. If byteorder is little, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use big.
Indicates whether twos complement is used to represent the integer.
the imaginary part of a complex number
Returns True. Exists for duck type compatibility with float.is_integer.
the numerator of a rational number in lowest terms
the real part of a complex number
Return an array of bytes representing an integer.
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.
The byte order used to represent the integer. If byteorder is big, the most significant byte is at the beginning of the byte array. If byteorder is little, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use big.
Determines whether twos complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
| Web Proxy Viewer | New URL | Original Page |