当前位置:网站首页>【Colab】【使用外部数据的7种方法】
【Colab】【使用外部数据的7种方法】
2022-07-03 12:03:00 【爱笑的冷面鬼】
文章目录
方法1:通过Files explorer上传
点击Notebook的Files explorer面板:
然后点击上传按钮:
当上传结束后,就可以直接读取:
方法2:使用Colab files上传
输入并运行下面代码:
from google.colab import files
uploaded = files.upload()

然后就可以选择对应的文件,完成上传:
方法3:读取Github链接
在github页面找到对应的文件路径,注意是文件的Raw链接:
然后将链接写到对应的位置。
方法4:克隆Github项目
先从命令行下载项目:
!git clone https://github.com/BindiChen/machine-learning.git
然后从对应的路径完成数据读取。
方法5:使用wget/axel下载文件
在Notebook中可以使用Linux系统命令,可以使用wget或axel下载数据:
方法6:读取谷歌硬盘数据
挂载了谷歌硬盘后,写好路径完成读取:

方法7:Kaggle API完成数据下载
详细步骤可以参考以前的文章:【Colab】连接【Kaggle】使用Kaggle数据集/文[email protected]
首先在Kaggle账户的Kaggle API,点击Create New API Token,会下载一个kaggle.json文件。
将kaggle.json文件上传后,就可以使用kaggle-api下载比赛数据或者数据集。
!kaggle competitions download -c titanic
!kaggle datasets download -d alexanderbader/forbes-billionaires-2021-30

Reference
边栏推荐
- Create a dojo progress bar programmatically: Dojo ProgressBar
- How to get user location in wechat applet?
- studio All flavors must now belong to a named flavor dimension. Learn more
- Nodejs+express+mysql realizes login function (including verification code)
- 【数据库原理及应用教程(第4版|微课版)陈志泊】【第七章习题】
- The latest version of blind box mall thinkphp+uniapp
- Sword finger offer07 Rebuild binary tree
- 2021 autumn Information Security Experiment 1 (password and hiding technology)
- Swift5.7 扩展 some 到泛型参数
- GCN thinking - word2vec directly calculates text classification
猜你喜欢

studio All flavors must now belong to a named flavor dimension. Learn more

4. Wireless in vivo nano network: electromagnetic propagation model and key points of sensor deployment

【计网】第三章 数据链路层(2)流量控制与可靠传输、停止等待协议、后退N帧协议(GBN)、选择重传协议(SR)

社交社区论坛APP超高颜值UI界面

Sword finger offer05 Replace spaces

GaN图腾柱无桥 Boost PFC(单相)七-PFC占空比前馈

Deeply understand the mvcc mechanism of MySQL
![[comprehensive question] [Database Principle]](/img/d7/8c51306bb390e0383a017d9097e1e5.png)
[comprehensive question] [Database Principle]

Togaf certification self-study classic v2.0

Four problems and isolation level of MySQL concurrency
随机推荐
Openstack node address change
记录自己vulnhub闯关记录
【R】【密度聚类、层次聚类、期望最大化聚类】
Enable SASL authentication for memcached
十条职场规则
Oh my Zsh + TMUX installation
How to stand out quickly when you are new to the workplace?
并网-低电压穿越与孤岛并存分析
Sqoop1.4.4原生增量导入特性探秘
Method overloading and rewriting
Express abstract classes and methods
公纵号发送提示信息(用户微服务--消息微服务)
Nodejs+Express+MySQL实现登陆功能(含验证码)
Social community forum app ultra-high appearance UI interface
GaN图腾柱无桥 Boost PFC(单相)七-PFC占空比前馈
Simple use and precautions of kotlin's array array and set list
Idea packages the web project into a war package and deploys it to the server to run
How to get user location in wechat applet?
Integer case study of packaging
Grid connection - Analysis of low voltage ride through and island coexistence