Python 使用pandas找不到Google Colaboratory文件
我尝试使用Python 使用pandas找不到Google Colaboratory文件,python,pandas,google-colaboratory,Python,Pandas,Google Colaboratory,我尝试使用pandas在Google Colaboratory上读取CSV文件时遇到以下stacktrace: --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-3-db5b87e1daf2> in &l
pandas
在Google Colaboratory上读取CSV文件时遇到以下stacktrace:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-db5b87e1daf2> in <module>()
----> 1 read_file = pd.read_csv(r"data_CHEMBL204.csv")
4 frames
/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py in __init__(self, src, **kwds)
2008 kwds["usecols"] = self.usecols
2009
-> 2010 self._reader = parsers.TextReader(src, **kwds)
2011 self.unnamed_cols = self._reader.unnamed_cols
2012
pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__()
pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()
FileNotFoundError: [Errno 2] No such file or directory: 'data_CHEMBL204.csv'
---------------------------------------------------------------------------
FileNotFoundError回溯(最近一次调用上次)
在()
---->1 read_file=pd.read_csv(r“data_CHEMBL204.csv”)
4帧
/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py in___init__;(self,src,**kwds)
2008 kwds[“usecols”]=self.usecols
2009
->2010 self.\u reader=parsers.TextReader(src,**kwds)
2011 self.unnamed\u cols=self.\u reader.unnamed\u cols
2012
pandas/_libs/parsers.pyx在pandas中。_libs.parsers.TextReader.uuuu cinit_uuuu()
pandas/_libs/parsers.pyx在pandas中。_libs.parsers.TextReader._设置_解析器_源()
FileNotFoundError:[Errno 2]没有这样的文件或目录:“data_CHEMBL204.csv”
我不确定您的CSV文件放在哪里,但是如果您将本地文件上载到GoogleDrive,路径应该是/content/data\u CHEMBL204.CSV
试试看。