Women & Children Feature Variable

I am trying to make a feature variable but I can’t figure out how to code it. I want to combine the “Sex” variable and the “Parch” variable. What I want is if the passenger is a female with children or parents they should be coded as 1 in a new variable called “WomenandChildren.” If they are a woman without children/parents or a male with or without children they should be coded as a 0. My theory is that women with children were more likely to survive then women without children or men with or without children.

Link to Full Article: Women & Children Feature Variable