Book Image

Python for Finance

By : Yuxing Yan
Book Image

Python for Finance

By: Yuxing Yan

Overview of this book

Table of Contents (20 chapters)
Python for Finance
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding the data types


In the following table, most of the types of data are given:

Data type

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 float64

float32

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

float64

52 bits mantissa

complex

Shorthand for complex128

complex64

Complex number; represented by two 32-bit floats (real and imaginary components)

complex128

Complex number; represented by two 64-bit floats (real and imaginary components)