Python 如何在google drive中使用tabla读取PDF文件
嗨,我目前正在尝试做一些自动化,将PDF文件转换为CSV,然后加载到大查询。我唯一的问题是从谷歌硬盘文件夹中读取和转换PDF文件 我目前正在通过colab使用tablaPython 如何在google drive中使用tabla读取PDF文件,python,google-drive-api,google-colaboratory,tabula,Python,Google Drive Api,Google Colaboratory,Tabula,嗨,我目前正在尝试做一些自动化,将PDF文件转换为CSV,然后加载到大查询。我唯一的问题是从谷歌硬盘文件夹中读取和转换PDF文件 我目前正在通过colab使用tabla -------------------- My code: (Note that i've already installed everything...) import tabula # Read pdf into list of DataFrame df = tabula.read_pdf('/content/drive/
--------------------
My code: (Note that i've already installed everything...)
import tabula
# Read pdf into list of DataFrame
df = tabula.read_pdf('/content/drive/My\ Drive/GDriveToGCS-Folder/TestPDFFileConversion.pdf', pages=2)
--------------------
Error Message:
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/My\\ Drive/GDriveToGCS-Folder/TestPDFFileConversion.pdf'
--------------------
有人试过吗?问题是这个反斜杠
My\ Drive
将其替换为
My Drive
它已经在python字符串引号中:'/content/drive/My drive/…'