Skip to main content

pandas_conditionals

df.loc[df.AAA >= 5,['BBB','CCC']] = 555;
df['logic'] = np.where(df['AAA'] > 5,'high','low'); df