Google Colaboratory:read 来自 google 驱动程序的数据
Google Colaboratory:read data from google driver
我只想从我的 google 驱动程序读取 a.txt
,当我使用 !cat
命令时,我可以看到 a.txt
的输出消息,但是当我使用pd.read_table ()
命令,出现错误是因为:FileNotFoundError
.
你能帮帮我吗?
您不需要在字符串中使用反斜杠 \
转义 space。如果这样做,实际上是在字符串中添加了反斜杠,这会导致路径无效。
所以重写:
prior=pd.read_table('/content/gdrive/My Drive/test/a.txt')
我只想从我的 google 驱动程序读取 a.txt
,当我使用 !cat
命令时,我可以看到 a.txt
的输出消息,但是当我使用pd.read_table ()
命令,出现错误是因为:FileNotFoundError
.
你能帮帮我吗?
您不需要在字符串中使用反斜杠 \
转义 space。如果这样做,实际上是在字符串中添加了反斜杠,这会导致路径无效。
所以重写:
prior=pd.read_table('/content/gdrive/My Drive/test/a.txt')