Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Is there a straightforward way to insert a GeoDataFrame into an existing schema? I love the geopandas.GeoDataFrame.to_postgis but this creates a new schema. I only need to insert a table into an existing schema.
geopandas.GeoDataFrame.to_postgis should not be creating a new schema. It will throw an error if the specified schema does not exist.
If you have created the schema, this should work just fine:
gdf.to_postgis('tablename', con, schema='schemaname')
Required, but never shown