I\'ve a csv file like this:
Fruit_Type;Fruit_Color;Fruit_Description Apple;Green,Red,Yellow;Just an apple Banana;Green,Yellow;Just a Banana Orange;Red,Yellow;Jus
I suggest use str.get_dummies:
df = df.join(df.pop('Fruit_Color').str.get_dummies(',')) print (df) Fruit_Type Fruit_Description Green Red Yellow 0 Apple Just an apple 1 1 1 1 Banana Just a Banana 1 0 1 2 Orange Just an Orange 0 1 1 3 Grape Just a Grape 0 0 0