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