Get the condition caught in a if with multiple or conditions in pandas (python) [duplicate]
I'm iterating the rows of a pandas dataframe. In case the row enters the if, I want to print the index of the condition with which it has entered the if.
if (row['MCN'] == 2) or (row['ERNF'] == 'T') or (row['EAT1'] == 'T6'):
print("The co开发者_如何学Pythonndition is", index)
Is there any way to get this index?
精彩评论