Postgres Loop Through Pandas Dataframe