Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jan 23, 2013

Doesn't cover complex numbers for now (no formatter implemented in format.py)

I think the "supress" kwd choice in numpy is not that awesome. So I borrowed chop from
the mathematica parlance.
#2734

@sglyon
Copy link
Contributor

sglyon commented Jan 24, 2013

It does what I asked - Thanks!

There is one improvement I think we could make. Assuming I have set the precision option to 5, when displaying a chopped entry near other data in scientific format (something like 2.54443e-03), the chopped value will display as0.00000e+00. It would be nice if it just printed 0 instead of '0.' + '0' * precision + 'e+00'.

A side note, is there a way to control if things are printed in scientific format (with the e's)?

…values as zero GH2735

Doesn't cover complex numbers for now.
@ghost
Copy link
Author

ghost commented Jan 26, 2013

You can look at the code for pandas.set_eng_float_format to see how it's done,
and you can pass your own formatters to to_string() for even more control.

@ghost ghost assigned wesm Feb 10, 2013
@wesm
Copy link
Member

wesm commented Feb 10, 2013

cherry picked. thanks

@wesm wesm closed this Feb 10, 2013
@ghost
Copy link
Author

ghost commented Mar 11, 2013

added mention to v0.11.0.txt and pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants