Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在google drive中使用tabla读取PDF文件_Python_Google Drive Api_Google Colaboratory_Tabula - Fatal编程技术网

Python 如何在google drive中使用tabla读取PDF文件

Python 如何在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/

嗨,我目前正在尝试做一些自动化,将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\ 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/…'