import pandas as pd
data=[["John","Alzheimer's","Infection","Alzheimer's"],["Kevin","Pneumonia","Pneumonia","Tuberculosis"]]
df=pd.DataFrame(data,columns=['Name','Problem1','Problem2','Problem3'])
In this data frame, I would like to read through each row and remove duplicates so that each person's problem is only reported once. This would mean removing "Alzheimer's" as a duplicate in row 1. I tried the drop_duplicates() function but this removes the entire row.
Any help would be appreciated!