控制台打印时显示的2位小数:
pd.set_option('precision', 2)
实际修改数据精度:
官例:http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.round.html
>>> df = pd.DataFrame(np.random.random([3, 3]),
... columns=['A', 'B', 'C'], index=['first', 'second', 'third'])
>>> df
A B C
first 0.028208 0.992815
1