Open
Description
see also #17280, #25917 and #25919
Note: complex numbers are covered by #25514 and #25745 for to_string()
Code Sample, a copy-pastable example if possible
import pandas as pd
float_val = 0.55555555
complex_val = complex(float_val,float_val)
tuple_val= float_val,float_val
df = pd.DataFrame([float_val, complex_val, tuple_val])
pd.set_option('display.precision', 3)
df
0 | |
---|---|
0 | 0.556 |
1 | (0.55555555+0.55555555j) |
2 | (0.55555555, 0.55555555) |
Problem description
not all the float values are displayed with a precision of 3.
Expected Output
0 | |
---|---|
0 | 0.556 |
1 | (0.556+0.556j) |
2 | (0.556, 0.556) |
Output of pd.show_versions()
[paste the output of pd.show_versions()
here below this line]