pandas将某列变为整数
df'[列名'].round()
round(df['列名'])
将所有变为整数
df.round()
将不同列保留不同小数个数
df.round({'A1':1,'A2':2})
df.applymap(lambda x: '%.2f'%x)
pandas将某列变为整数
df'[列名'].round()
round(df['列名'])
将所有变为整数
df.round()
将不同列保留不同小数个数
df.round({'A1':1,'A2':2})
df.applymap(lambda x: '%.2f'%x)