1

Data in a .csv file looks like this:

enter image description here

But when I am using function describe it shows me numbers in scientific notation?

How can I format them within describe function?

enter image description here

3
  • Would pd.set_option('float_format',lambda x: "%.6f" % x) work? github.com/pandas-dev/pandas/issues/6842 Commented Mar 15, 2018 at 0:56
  • 2
    Thanks. Could you post an answer so I'll accept it? Thank you Commented Mar 15, 2018 at 18:14
  • Great! posted as an answer. Commented Mar 15, 2018 at 18:31

1 Answer 1

2

You can try following as mentioned in similar issue:

pd.set_option('float_format',lambda x: "%.6f" % x)

From the document:

display.float_format : callable
    The callable should accept a floating point number and return
    a string with the desired format of the number. This is used
    in some places like SeriesFormatter.
    See formats.format.EngFormatter for an example.
    [default: None] [currently: None]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.