I have a pandas DataFrame,df, that I want to append to a remote table TabB on a postgres db. Both tables shares the same columns. How can I perform this using pandas and sql alchemy?
My sqlalchemy engine is defined as this:
myengine=create_engine('postgresql://postgres:postgres@xxx.xx.xxx.xxx:5433/mydb')
I would like to know if I can apply a method like df.read_sql()
to pass a proper INSERT TO
. Any example would be greatly appreciated. Thanks in advance!