Ipython-sql 默认文件夹

Ipython-sql default folder

我想使用 ipython-sql extension.

将 CSV 文件中的数据加载到 Postgresql 数据库中

我按照 this SO question 上的示例操作,但出现错误:

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

我怀疑这是由于扩展的默认路径与笔记本路径不同所致。如果我使用绝对路径,我可以成功加载数据,但这很丑陋。有什么想法吗?

你应该在 COPY 命令中使用 'The absolute path name of the input or output file'...