Pandas DataFrame Colom Berdasarkan Kolom Lain

df['c2'] = np.where(df.c1 == 8,'T', 'F')

   c1  c2  c3
0   4   F   1
1   8   T   9
2   1   F   8
3   3   F   5
4   3   F   8
Arno Deceuninck