How to create dynamic columns from this pandas dataframe.
Name, Sex
a, M
b, F
c, M
d, F
Expected dataframe:
Name, M, F
a, 1, 0
b, 0, 1
c, 1, 0
d, 0, 1
I have tried pandas.pivot() but of no use, could you guys suggest something.