вот пример для этого: если lr> 0,5 и ly> 0,4 и фунт> 0,3
import random
import pandas as pd
data = {'lr': [],
'ly': [],
'lb': []
}
for i in range(20):
r = random.random()
y = random.random()
b = random.random()
data['lr'].append(r)
data['ly'].append(y)
data['lb'].append(b)
data
df = pd.DataFrame(data)
df['new_column'] = 0
filt = (df['lr'] > 0.5) & (df['ly'] > 0.4) & (df['lb'] > 0.3)
df.loc[filt, 'new_column'] = 1
df