Vivian
4/16/2019 - 6:51 AM

Remove decimal

# option 1
df = df.astype({'col_1':int,'col_2':int}) 
# note df.astype  returns a dataframe in which the data type is int. But it does not alter it in place. You need to assign it back into the same positions

# option 2
pd.options.display.float_format = '{:.0f}'.format # 0 is number of decimal