擅长:python、mysql、java
<p>我在获取错误消息文件时遇到了同样的问题</p>
<blockquote>
<p>b'G:\Tensorflow_tutorial_karim\test.csv' not found.</p>
</blockquote>
<p>在搜索了许多链接后,无法得到任何满意的回复,pd.read_csv(文件名)也无法工作。</p>
<p>在将test.csv文件粘贴到C:\ workingDirectory后,我尝试使用spider I-python控制台。它给出了错误信息</p>
<blockquote>
<p>"SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes
in position 2-3: truncated \UXXXXXXXX escapeto the effect'cannot
decode escape characters".</p>
</blockquote>
<p>根据这个线索,我在path中将反斜杠('\')替换为正斜杠('/'),它工作得很好。</p>
<p>有了这个,Jupyter笔记本也可以毫无问题地读取文件,希望对其他人也有用。</p>