precision | Display Options | Teradata Python Package - precision - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Publication Date
March 2025
Content Type
User Guide
Publication ID
B700-4006-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
ft:sourceId
dita
dita:id
rkb1531260709148
Product Category
Teradata Vantage

The precision option controls the number of places to round a numeric column when printing the DataFrame. The default value is 3.

This option only affects data when printed. When retrieving actual values from the DataFrame (such as with to_pandas()), the numeric column is returned with precision as specified in the schema.

The precision setting does not affect columns of type float.

Example: Default value is 3

>>> display.precision
3
 
>>> DataFrame('numeric')
 
 
   integer smallint bigint decimal     float number number2 number3 byteint
id                                                                        
2        2        3      4   4.860  5.313308  5.737     .46    .687       2
1        1        2      2   2.430  2.656654  2.869     .23    .344       1
3        3        4      8   7.290  7.969962  8.606     .69   1.031       3

Example: Set the value to 1

>>> display.precision = 1
>>> DataFrame('tips')
 
 
   integer smallint bigint decimal     float number number2 number3 byteint
id                                                                        
2        2        3      4     4.9  5.313308    5.7      .5      .7       2
1        1        2      2     2.4  2.656654    2.9      .2      .3       1
3        3        4      8     7.3  7.969962    8.6      .7       1       3