I am trying to remove the whitespace on student number by using TRANSLATE() inside the execute() of psycopg2. Problem that I am getting is, even if I will just print the row with the column name(e.g. row['snumber']), I am getting KeyError error message. The code works if i will print the row with index value(e.g. row[0])