WHERE or IF function in Numpy
Script
union['CH'] = np.where(union['Invoice Type'] == 'Normal Sales', union['Channel Name'],'Wedding & Function')
Explanation
- IF "Invoice Type" = "Normal Sales" then union['CH'] = union['Channel Name']
- Else union['CH'] = "Wedding & Function"
Comments
Post a Comment