[Solved] If condition using Python [closed]


According to numpy.where documentation, it only takes 3 arguments, condition and x (if true),y (if false) array_like. To get your desired output:

db['Condition'] = numpy.where(db['Value'] < 50, 'Less than 50', numpy.where(db['Value']<100, 'Less than 100','More than 100'))

1

solved If condition using Python [closed]