1. Make it Case Insensitive
Change your dictionary to use all lower-case keys. (eg, 'dr': 'Drive' ).
Then change your assignment statement to use the lowercase version of the value as the key to your dictionary:
row = d[row.lower()].title()
(I would leave out the title() myself, and just make sure that the dictionary values are all correctly title-...
I contacted Royal Mail about this, the additional fields (in order are):
Number of Households
More information about Address and Organisation Keys can be found in the “Structure of the PAF® database” section of the Programmers Guide (page 22) at https://www.poweredbypaf.com/wp-content/uploads/2017/07/Latest-...