Postgresql Loop Through Pandas Dataframe