标签: python python-3.x pandas postgresql python-2.7
我想知道是否可以使用Pandas方法DataFrame.to_sql(使用sqlalchemy)添加sql RETURNING子句。
我想将数据上传到具有rowid(由数据库生成的序列)的postgres表中。我想知道我刚刚上传到数据库的行的rowid。
我知道直接使用slqalchemy可以实现这一目标,但是有什么方法可以使用pandas Dataframe.to_sql或Series.to_sql方法做到这一点?