google-colaboratory - 如何在 Google Colab 上使用示例数据文件?
问题描述
Google Colab 附带了一些示例数据文件。我正在使用我要使用的文件的文件路径并尝试使用 pandas 访问它。
pandas.read_csv('content/sample_data/mnist_test.csv')
一直给我这个错误:
FileNotFoundError: File b'content/sample_data/mnist_test.csv' does not exist
我错过了什么?
解决方案
您在 google-colab 中的当前文件夹是/content
. 您可以使用
pandas.read_csv('sample_data/mnist_test.csv')
或者
pandas.read_csv('/content/sample_data/mnist_test.csv')
推荐阅读
- php - 在 PHP 中解析来自 SEMRush API 的数据 [分号分隔]
- scheme - 违反球拍合约(最大递归函数)
- swift - NSClickGestureRecognizer - 识别后如何传递点击
- jenkins - 如何在安装在远程 PC 上的 Jenkins 中定义 POM 位置
- r - 创建可以判断变量输入是字符串还是符号的 dplyr 函数
- c - C:将二维数组交给双指针
- powershell - 从 CLI 发送可变数量的键值对
- javascript - Filereader API 在 Chrome 中不工作在 IE 中工作
- python - 如何将数据从一个项目的存储桶加载到 python 中的另一个项目的表中?
- angularjs - 控制器“初始化”函数执行了不止一次