df = df.round(decimals=0).astype(object)
import numpy as np
import pandas as pd
s = pd.Series([ None, np.nan, '',8.00735e+09, 4.35789e+09, 6.10644e+09])
s_new = s.fillna('').astype(str).str.replace(".0","",regex=False)
s_new
without_trailing_zeros = string.rstrip('0').rstrip('.') if '.' in string else string
댓글