1

I have a Dataframe which I read from a csv File, some Columns in this File have numbers in it that are formatted as Scientific notation (something like in the picture below)

enter image description here

The Problem is that if I check the dtype of the columns it's already formatted as float64, so what can I do to change them like the other number format (like 675537540.2)?

Thanks for your help!

bimarian
  • 130
  • 1
  • 11
  • I've seen that Question but this person is asking to convert the numbers to strings but I want to convert it to a number format that does not display scientific notation like numbers. – bimarian Oct 24 '19 at 13:05
  • The lambda you used in the approach you mention in the question returns string. I hope you can see how this is confusing. – gstukelj Oct 24 '19 at 13:09
  • Oh sorry about that I didn't realize that! – bimarian Oct 24 '19 at 13:11

1 Answers1

0

You need to change the display format of floats with pd.set_option:

pd.set_option('display.float_format', lambda x: '%.2f'.format(x))
Franco Piccolo
  • 6,845
  • 8
  • 34
  • 52