I have been researching similar questions but have not been able to find answers. I would appreciate if you could help me since I am new to programming and Python(2.7)..
So I have this panda dataframe.
What I would like to do is that putting 1 in a man column, if a "man" string is contained in info column( and in the same row). Otherwise, I would like to put 0. The same for woman column. So, what I want is something like this.
This is what I want to create:
Is there any way I can create a function which identifies specified string, such as man or woman in info column, and puts 1 or 0 in man and woman columns accordingly?