Does anyone know of some Python
package or function that can upload a Pandas DataFrame
(or simply a .csv
) to a PostgreSQL table, even if the table doesn't yet exist?
(i.e. it runs a CREATE TABLE with the appropriate column names and columns types based on a mapping between the python data types and closest equivalents in PostgreSQL)
In R
, I use the ROracle
package which provides a dbWriteTable
function that does what I've described above. (see docs here)