I have a column formatted like this:
American express,Visa,Master Card,Diners
American express,Visa,Master Card,Bancomat
all
Visa,Master Card,Diners,Banco
I want to create different columns for each element with 1 or 0 if the given card is found in the list or not.
The expected results should be something like this:
Visa American Express Master Card Diners Bancomat
1 1 1 1 0
1 1 1 0 1
1 1 1 1 1
1 0 1 1 0
Is there a way in pandas to do so?