I upload data from Excel tables (the formats of all columns are the same!) But in DF, they are displayed differently, some columns are normal, and some are in 2.113000e+02 style. When you upload to Excel everything is fine, but for now you are working in just such a format. How to solve this problem?

    1 answer 1

    Example:

     In [65]: df = pd.DataFrame({'a':[123.45678, 1.23456789e10, 1.23456789e-12]}) In [66]: df Out[66]: a 0 1.234568e+02 1 1.234568e+10 2 1.234568e-12 In [67]: pd.set_option('display.float_format', '{:.3f}'.format) In [68]: df Out[68]: a 0 123.457 1 12345678900.000 2 0.000