Working with PDB Column type in Python Script nodes

OK, I answer my own question after a lot of trial and error and maybe a few lucky leaps from this super-useful post from @carstenhaubold

For anyone else looking in the future (probably me, but someone else must do this sort of thing right?!)

import knime.scripting.io as knio
import knime.types.biology as kbio

df = knio.input_tables[0].to_pandas()

rowCount = knio.input_tables[0].num_rows

output_pdbs = []

for rowIdx in range(rowCount):
    # Seems I can use this directly as a String
    input_pdb = df['PDB'][rowIdx]
    output_pdb_str = do_some_stuff_to_pdb(input_pdb)
    output_pdb = None if output_pdb_str is None else knio.PdbValue(output_pdb_str)
    output_pdbs.append(output_pdb)

df['new pdb column'] = output_pdbs
knio.output_tables[0] = knio.Table.from_pandas(df)

(If anyone wants to improve my python-speak, suggestions welcome!)

Steve