I have a PostgreSQL db. Pandas has a \'to_sql\' function to write the records of a dataframe into a database. But I haven\'t found any documentation on how to update an exis
One way is to make use of an sqlalchemy "table class" and session.merge(row), session.commit():
Here is an example:
for row in range(0, len(df)): row_data = table_class(column_1=df.ix[i]['column_name'], column_2=df.ix[i]['column_name'], ... ) session.merge(row_data) session.commit()