Truncating a Float in Python from decimal import Decimal as D, ROUND_DOWN f = 1.2345 print( D(f).quantize(D('0.01'), rounding=ROUND_DOWN) # 1.23 ) D('0.01') truncates the float to two decimal places.