>>> df = pd.DataFrame(np.random.random([3,3]),... columns=['A','B','C'], index=['first','second','third'])>>> df
A B C
first 0.0282080.9928150.173891
second 0.0386830.6456460.577595
third 0.8770760.1493700.491027>>> df.round(2)
A B C
first 0.030.990.17
second 0.040.650.58
third 0.880.150.49>>> df.round({'A':1,'C':2})
A B C
first 0.00.9928150.17
second 0.00.6456460.58
third 0.90.1493700.49>>> decimals = pd.Series([1,0,2], index=['A','B','C'])>>> df.round(decimals)
A B C
first 0.010.17
second 0.010.58
third 0.900.49