Pandas dataframe到Redshift psql选项卡

2024-03-28 17:34:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直在尝试将数据插入Redshift表中。这种方法通常对我有效:

test_df.to_sql('MY_table', engine, index=False, if_exists ='append')

如您所见,我已经使用了'append'进行新的插入。但是今天红移一直给我错误的说:

ProgrammingError: (psycopg2.ProgrammingError) Relation "MY_table" already exists

你知道为什么吗?在


Tags: to数据方法testfalseredshiftdfsql