I have into a dictionary some sequences. I would like to replace the sequences name for new names contained into a dataframe.
#my sequences into a dictionary
sequence = {"seq01": "agatcatggctaactatgcacgtgca",
"seq02": "atatcatggctaactatgcacgtgca",
"seq03": "tgatcatggctaactatgcacgtgca"}
#my data frame containing old names and new names
data = {"old_name": ["seq01", "seq02","seq03"], "new_name": ["sample1", "sample2", "sample3"]}
data = pd.DataFrame(data)
print(data)
I tried to replace the old names with a for loop, but it was imposible to do it.
Thank you