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

Output for small decimal numbers is misleading #1911

Closed
louist87 opened this issue Sep 14, 2012 · 2 comments
Closed

Output for small decimal numbers is misleading #1911

louist87 opened this issue Sep 14, 2012 · 2 comments
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@louist87
Copy link

I think that this question on stackoverflow sums up the problem fairly concisely.

In a nutshell, the 0 and -0 output for very small decimal numbers is misleading and looks a lot like an error. It might be better just to show scientific notation directly.

@wesm
Copy link
Member

wesm commented Sep 17, 2012

I have to look at what to do here. Note that setting engineering format helps:

In [5]: pd.set_eng_float_format()

In [6]: pd.read_table('http://dl.dropbox.com/u/6160029/gradStat_mmn.tdf').head()
Out[6]: 
   Subject Group Local Global  Attn         mean
0        1  DSub     S      S  Attn  325.290E-24
1        1  DSub     S      S  Dist  601.010E-24
2        1  DSub     D      S  Attn  421.570E-24
3        1  DSub     D      S  Dist  830.810E-24
4        1  DSub     S      D  Attn  298.350E-24

@wesm wesm closed this as completed in de31cbe Sep 17, 2012
@wesm
Copy link
Member

wesm commented Sep 17, 2012

Fixed the underlying issue:

In [1]: df = pd.read_table('http://dl.dropbox.com/u/6160029/gradStat_mmn.tdf')

In [2]: df.head()
Out[2]: 
   Subject Group Local Global  Attn          mean
0        1  DSub     S      S  Attn  3.252900e-22
1        1  DSub     S      S  Dist  6.010100e-22
2        1  DSub     D      S  Attn  4.215700e-22
3        1  DSub     D      S  Dist  8.308100e-22
4        1  DSub     S      D  Attn  2.983500e-22

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

2 participants