lundi 2 septembre 2019

How do I insert if statement inside numpy.where()?

I am trying to execute the following command:

compare_values =data1.values == data2.values
rows, columns = numpy.where(compare_values == False)

and get validator check: E712 comparison to False should be 'if cond is False:' or 'if not cond:'

data1 and data2 are of type data frame rows and columns are arrays.

I tried inserting if statement inside numpy.where()but that does not work.

compare_values =data1.values == data2.values
rows, columns = numpy.where(compare_values == False)

I am getting the following validation check: E712 comparison to False should be 'if cond is False:' or 'if not cond:' How to resolve this?

Aucun commentaire:

Enregistrer un commentaire