I want to find all of the duplicates in the first column Primary Mod Site and only keep the highest value for all of the compounds (columns B-M) in the dataset.
excel sheet
For code, I have:
#read desired excel file
df = pd.read_excel("20220825_CISLIB01_Plate-1_Rows-A-B")
#function to find the duplicates in the dataset, sections them, and remove them
#can be applied to any dataset with the same format as original excel files
def getDuplicate():
gene = df["Primary Mod Site"]
#creates a list of all of the duplicates in Primary Mod Site
pd.concat(g for _, g in df.groupby("gene") if len(g) > 1)
Im stuck on what to do next. Help much appreciated!