首页 > 解决方案 > 如何在 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-colaboratory

解决方案


您在 google-colab 中的当前文件夹是/content. 您可以使用 pandas.read_csv('sample_data/mnist_test.csv')

或者 pandas.read_csv('/content/sample_data/mnist_test.csv')


推荐阅读