Why are Pandas and GeoPandas able to read a database table using a psycopg2 connection but have to rely on SQLAlchemy to write one?
问题 Context I just get into trouble while trying to do some I/O operations on some databases from a Python3 script. When I want to connect to a database, I habitually use psycopg2 in order to handle the connections and cursors. My data are usually stored as Pandas DataFrames and/or GeoPandas's equivalent GeoDataFrames. Difficulties In order to read data from a database table; Using Pandas: I can rely on its .read_sql() methods which takes as a parameter con , as stated in the doc: con :