I contain a tsv file, and I am trying to print data I acquire to a specific header in my tsv file.
This is what my table looks like. Right now, I am trying to scan through some data, and print to the 1-generated, 1-chains, 2-generated, 2 chains, .... based on the number of matches I find.
The problem is, I need to print data to each generated column without printing to the first 3 columns. Also, I an trying to print to each column in a specific way. For the "generated" column, I want to print only to the generated column, and not the chains column when looking for generated data. Same for the chains column.
In the example, I need to print the first word which comes after REMARK 350 in line 1 "Author" and line 2 print the letter.
Desired Output:



pdbfiles look like and how you would like to write the data to thetsvfile. It would be helpful if you could update the question with a plaintext (no image) sample of thetsvfile, of apdbfile and an example of the desired output. Also biopandas might be a relevant module for your work.