如何使用 Google Colab 上的示例数据文件?

4 google-colaboratory

Google Colab 附带了一些示例数据文件。我正在使用我想要使用的文件的文件路径并尝试使用 Pandas 访问它。

pandas.read_csv('content/sample_data/mnist_test.csv') 一直给我这个错误:

FileNotFoundError: File b'content/sample_data/mnist_test.csv' does not exist

我错过了什么?

use*_*875 6

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

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