Isi variabel berdasarkan nilai variabel lain python
df['new_variable'] = (df['dec'].eq(1) & df['type'].isin([3,2,1])).view('i1')
Filipe_Carvalho
df['new_variable'] = (df['dec'].eq(1) & df['type'].isin([3,2,1])).view('i1')