Data Type Mapping | Teradata Python Package - 17.00 - Data Type Mapping between Advanced SQL Engine, teradataml DataFrame dtypes and Python - Teradata Package for Python

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.00
Release Date
November 2021
Content Type
User Guide
Publication ID
B700-4006-070K
Language
English (United States)

This table lists the data type mapping between Advanced SQL Engine, teradataml DataFrame dtypes, and Python.

Advanced SQL Engine Data Type teradataml DataFrame dtypes Python
BIGINT int int
BLOB(n) bytes bytes
BYTE(n) bytes bytes
BYTEINT int int
CHAR(n) str int
CLOB(n) str str
DATE FORMAT 'YY/MM/DD' datetime.date datetime
DECIMAL(p,q) / Numeric decimal.decimal decimal
DOUBLE PRECISION float decimal
FLOAT float float
INTEGER int int
INTERVAL DAY(n) str str
INTERVAL DAY(n) TO MINUTE str str
INTERVAL DAY(n) TO SECOND(n) str str
INTERVAL HOUR(n) str str
INTERVAL MINUTE(n) str str
INTERVAL MONTH(n) str str
INTERVAL SECOND(p,q) str str
INTERVAL YEAR(n) str str
NUMBER(p,q) decimal.decimal decimal
PERIOD(DATE) str str
PERIOD(TIME(n)) str str
PERIOD(TIME(n) WITH TIME ZONE) str str
PERIOD(TIMESTAMP(n) WITH TIME ZONE) str str
REAL float float
SMALLINT int int
TIME(n) datetime.time datetime
TIME(n) WITH TIME ZONE datetime.time datetime
TIMESTAMP(n) datetime.datetime datetime
TIMESTAMP(n) WITH TIME ZONE datetime.datetime datetime
VARBYTE(n) bytes bytes
VARCHAR(n) str str
XML str str