如何在Jupyter上打开本地文件?

编程入门 行业动态 更新时间:2024-10-28 15:25:44
本文介绍了如何在Jupyter上打开本地文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在[1]中:

path='/Users/apple/Downloads/train.csv' open(path).readline()

出[1]:

FileNotFoundError Traceback (most recent call last) <ipython-input-7-7fad5faebc9b> in <module>() ----> 1 open(path).readline() FileNotFoundError: [Errno 2] No such file or directory: '/Users/apple/Downloads/train.csv'

我很困惑.我认为这段代码与许多教程完全相似,并且我确定我的文件在正确的路径中,但是为什么它不起作用?

I'm confused a lot.I thought this code is exactly similar with many tutorials, and I'm sure I have this file in the right path, but why does it not works?

推荐答案

许多教程都说我们应该更改Jupyter的工作流程,但我没有理解.

Many tutorials said that we should change Jupyter's workflow, but I didn't get it.

最后,我找到一种简单的方法:只需将文件拖到此部分即可.

Finally, I find an easy way: Just drags file to this part.

更多推荐

如何在Jupyter上打开本地文件?

本文发布于:2023-11-17 11:30:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609869.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:本地文件   如何在   Jupyter

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!