I have a user defined function like this which takes in the argument as the row number and returns A string that joins two protein IDs with ':'
def join_ppi(row):
if DF.loc[row].at["taxidA"] == '9606':
var= DF.loc[row].at["prot1"] + ':' + DF.loc[row].at["prot2"]
else:
var= DF.loc[row].at["prot2"] + ':' + DF.loc[row].at["prot1"]
return(var)
I'm able to get the output for individual rows. But when I try to use pd.append for including this user defined function for all rows, I'm unable to do that. Can anyone help me on that?
I'm attaching the data, just for reference
