While I was trying to load large (~5 GB) Postgres table to pandas
with pandas.read_sql("SELECT * FROM mytbl",conn)
I got memory error and the task failed. What is the proper way to do this?
I could achieve the wanted result by copying the data to a local CSV file first (see Export Postgres table to CSV file with headings) then loading it to pandas
with pandas.read_csv
. Thanks!