Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display.precision not honored for float-like values in notebook #25920

Open
simonjayhawkins opened this issue Mar 29, 2019 · 1 comment
Open
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string

Comments

@simonjayhawkins
Copy link
Member

simonjayhawkins commented Mar 29, 2019

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]

@ybagdasa
Copy link

Related: display.precision not honored for pd.Intervals of subtype float.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

4 participants