1

I have two columns in a dataframe "A" and "B". I want to create another column "C" which is True/False value based on whether df["A"] == df["B"]. The entries in "A"and "B" are float with variable significant digit. I want to recreate the following results-

A: 2.334    B: 2.334156      C: True
A: 2.3341   B: 2.334191      C: False
A: 2.33413  B: 2.33          C: True
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • 1
    https://stackoverflow.com/questions/33626443/comparing-floats-in-a-pandas-column is a different question. This question is asking about variable-length rounding in the same column which wasn't covered there. – PermanentPon Jul 30 '21 at 13:32

0 Answers0