Data manipulation

There are many different types of data, such as integer, real number, or string. The following table offers a list of those data types:

Data types

Description

Bool

Boolean (TRUE or FALSE) stored as a byte

Int

Platform integer (normally either int32 or int64)

int8

Byte (-128 to 127)

int16

Integer (-32768 to 32767)

int32

Integer (-2147483648 to 2147483647)

int64

Integer (9223372036854775808 to 9223372036854775807)

unit8

Unsigned integer (0 to 255)

unit16

Unsigned integer (0 to 65535)

unit32

Unsigned integer (0 to 4294967295)

unit64

Unsigned integer (0 to 18446744073709551615)

float

Short and for float6

float32

Single precision float: sign bit23 bits mantissa; 8 bits exponent

Get Python for Finance - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.