1

I want to load data from a CSV file into a Postgresql database using the ipython-sql extension.

I followed the example on this SO question but I get error:

(psycopg2.OperationalError) could not open file "./test_file.csv" for reading: No such file or directory

I suspect this is due to a default path for the extension that is different from the notebook path. I can successfully load the data if I use an absolute path, but that's ugly. Any ideas?

Community
  • 1
  • 1
Fra
  • 4,918
  • 7
  • 33
  • 50

1 Answers1

0

you should use 'The absolute path name of the input or output file' in COPY command...

Adam Silenko
  • 3,025
  • 1
  • 14
  • 30