| 方法 | Google Colab | Kaggle |
|---|---|---|
| 通过GitHub | !git clone GitHub链接 |
!git clone GitHub链接 |
| 通过Google Drive | from google.colab import drive drive.mount("/content/drive") |
暂不支持Google Drive,只支持付费服务Google Cloud Storage |
| 通过下载链接 | !wget + 下载链接 |
!wget + 下载链接 |
| 从本地上传 | from google.colab import files uploaded = files.upload() |
点击"Add Data" |
一、GitHub

二、谷歌硬盘Google Drive
1、挂载硬盘

本文总结了如何在Google Colab中从GitHub和谷歌硬盘导入数据。通过挂载谷歌硬盘并更改工作目录,可以实现数据的便捷读写,避免因Colab断线而丢失文件。同时,这种方式允许在谷歌硬盘管理界面直接修改文件,提高效率。


被折叠的 条评论
为什么被折叠?



