Home > Software engineering >  Python comparing 2 columns
Python comparing 2 columns

Time:10-21

I have a doubt and i tried with this code.

Im addin a new column to compare two columns so if they are equal return True and if they arent retunr False.

i Upload a pic of the codeenter image description here

CodePudding user response:

Try using the equal-to operator (==) instead. For example:

Evo_FlagF3['new_column'] = Evo_FlagF3['0.0'] == Evo_FlagF3['sum']
  • Related