python panda show mix values INT, STR with proper long INT

Viewed 38

Update

I tried the following but it still getting the 5.02401E+16 as string instead of the entire number 50240100011400000.

strong text

Initial Question

May I know how to handle mix values (int and string) while properly display correct full int value in the same column?

REFERENCE NO is the header

How to use panda to properly display the number 50240100011400000 instead of 5.02401E+16. Also I have non-integer value in the same column.

Million thanks in advance.

enter image description here

1 Answers

We can disable scientific notation in Pandas and Python by setting higher float precision :

pd.set_option('display.float_format', lambda x: '%.9f' % x)

for example after that setting we have this:

In [28]: pd.Series(np.random.randn(1))*1000000000
Out[28]: 
0    -757322420.605785987
dtype: float64
Related