(Feb-09-2020, 08:45 PM)new_to_python Wrote: So in Python, I don't need to do that explicitly and as long as two numbers (could both be float/double or one float/double and one integer) are close, they are considered to be the same?Has to be very close if remove one 0 and it's False.
>>> 3 == 3.000000000000001 FalseFor better control on how close look at math.isclose() numpy also have numpy.isclose.
There also a decimal module where can better control over precision,
can eg do financial calculation or as a calculator would output.
>>> 0.1 * 3 0.30000000000000004
>>> from decimal import Decimal >>> >>> result = Decimal('0.1') * Decimal('3') >>> result Decimal('0.3') >>> print(result) 0.3Pandas is a own big beast and can have other rules