我用python在一个tensorflow google colab笔记本上写了一些代码。你知道吗
我被这个错误困住了
FileNotFoundError: [Errno 2] File b'/home/brandon/Desktop/AnomalyDetection/Code/train/Y_10KHz_left.csv' does not exist: b'/home/brandon/Desktop/AnomalyDetection/Code/train/Y_10KHz_left.csv'
下面是有问题的代码片段:
from __future__ import absolute_import, division, print_function, unicode_literals
import functools
import numpy as np
import tensorflow as tf
import os
import pandas as pd
import matplotlib.pyplot as plt
import sklearn
#load the data from local file into a dataframe
path = '/home/brandon/Desktop/AnomalyDetection/Code/train/Y_10KHz_left.csv'
df = pd.read_csv(path)
df.head()
为了确认我的路是对的
(base) brandon@brandon:~/Desktop/AnomalyDetection/Code/train$ find $PWD -type f | grep "Y_10KHz_left.csv"
/home/brandon/Desktop/AnomalyDetection/Code/train/Y_10KHz_left.csv
在尝试读取文件之前,应该先检查文件是否存在。你知道吗
相关问题 更多 >
编程相关推荐