I have a csv file containing a few hundreds of PDB codes. I'm trying to figure out how to use Biopython to download these PDB files using each row of my csv file as input. I've seen that the PDBList module can be used to download PDB files by writing the PDB code on the download_pdb script but I was wondering if there is any way to tell PDBList to get those PDB codes from the csv file.
I got to this and don't know how to progress from here:
from Bio.PDB import PDBList csv = pd.read_csv("filename.csv", header = None) csv_df = pd.DataFrame(csv) csv_df.items() for row in csv_df.items(): pdbl.download_pdb_files(row)
Any ideas? Thank you very much Juan