Permission denied: 'test_1.csv'的错误

在Jupyter notebook上写python代码时遇到这个错误:

PermissionError: [Errno 13] Permission denied: 'test_1.csv'

出错的代码为:

data_new.to_csv("test_1.csv", index=None)

原因是我在执行这条语句的时候将文件test_1.csv打开了,关闭这个文件,再次执行的时候就好了

猜你喜欢

转载自blog.csdn.net/skj1995/article/details/82055509