I have a dataframe that looks like this.
I want to add a column 'Correct_entry' that returns 'True' or 'False' based on the combination of values in the current columns. In total I have 24 possible combinations that are correct. I give two examples:
1.
If df['Hazard_type'] == 'Drought' & df['Card_type'] == 'Red block' & If['Round'] == 1 & df['Scenario'] == 'scenario A' & df['Payment_type'] == 'One payment (lump sum)'
If df['Hazard_type'] == 'Drought' & df['Card_type'] == 'Green block' & If['Round'] == 1 & df['Scenario'] == 'scenario A' & df['Payment_type'] == 'One payment (lump sum)'
I have 24 different combinations of values that are all correct and should equal 'True'. All other combinations should equal to 'False'.
What would be the best way to go through this set of data? How can I combine all these different statements?
I hope it is clear.
edit: As requested, the data in text format.
Hazard_type Card_type Round Scenario Payment_type
244 Drought Green block 2 scenario B Two payments (two consecutive sums)
643 Drought Red block 4 scenario A Two payments (two consecutive sums)
584 Drought Red block 4 scenario A One payment (lump sum)
242 Drought Red block 2 scenario B Two payments (two consecutive sums)
1039 Drought Green block 6 scenario A Two payments (two consecutive sums)
101 Flood Red block 1 scenario A Two payments (two consecutive sums)