SyntaxFix
Write A Post
Hire A Developer
Questions
np.where function works as follows:
np.where
df['X'] = np.where(df['Y']>=50, 'yes', 'no')
In your case you would want:
import numpy as np df['my_channel'] = np.where(df.my_channel > 20000, 0, df.my_channel)