Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How to supress scientific notation in only one column of a dataframe

$
0
0

I have a dataframe where each column is floats rounded to different specific number of decimal places and a timestamp column. The timestamp column also prints in scientific notation.

I want to print the last 5 rows of the dataframe and suppress the scientific notation for only the ts column. The solutions I see only change the formatting for the entire dataframe and not the specific column.

I can provide an example...

print(df[-5:])               ts    data1   data2467  1.713263e+09  1005.52  5242.8468  1.713263e+09  3527.83  5227.1469  1.713263e+09  4079.06  5228.8470  1.713263e+09  5079.43  3478.9471  1.713263e+09  5224.44  3059.2

but I want

             ts    data1   data2467  1713263525  1005.52  5242.8468  1713263526  3527.83  5227.1469  1713263527  4079.06  5228.8470  1713263528  5079.43  3478.9471  1713263529  5224.44  3059.2

Viewing all articles
Browse latest Browse all 12111

Trending Articles