Decimal is a python data type that doesn't lose precision for decimal fractions. You can cast it to a float or an integer as you prefer.
>>> import decimal >>> float(decimal.Decimal("5.87")) 5.87 >>> int(decimal.Decimal("5.87")) 5 >>> round(decimal.Decimal("5.87")) 6But you can also just leave it as a Decimal, and most anything you want to do with it will work as you might expect a "regular" number to work.
>>> num = decimal.Decimal("5.87") >>> num > 4 True >>> print(num) 5.87