Following is the code in python that updates the records in the required database tables. Is there a better way to handle the same?
Read in SO that scanning dataframe