I am trying to create a function which creates a new column that identifies the oldest member of a household. The data looks something like this:
and I want to create this:
Where the oldest member is assigned 1 and everyone else in the household is assigned 0.
Any suggestions on how to tackle this or functions I could look up would be greatly appreciative, I’m still new to python and I’m quite stuck on this.