Python Runde
>>> import math
>>> math.ceil(5.2)
6
>>> math.ceil(5)
5
>>> math.ceil(-0.5)
0
Misty Macaw
>>> import math
>>> math.ceil(5.2)
6
>>> math.ceil(5)
5
>>> math.ceil(-0.5)
0
>>> import math
>>> math.floor(3.9) # round down
3
variable.round(3)
round(variable, 3)
print('{: .3f}'.format(variable))
print('{: .3f}'.format(df["y"].mean()))
print("variable : %0.3f" % variable)