Colaboratory 是Google免费的 Jupyter 笔记本环境,不需要进行任何设置就可以使用,并且完全在云端运行。可用来做机器学习和数据分析,常见问题回答可参考https://research.google.com/colaboratory/faq.html。
Colaboratory 概览
Notebook的基本单元是cell。cell包含两种类型,一种是code,一种是text。其中text是Markdown格式。
使用系统命令
使用魔法命令
Tab补全和函数帮助提示
文件处理
1.上传文件
from google.colab import files
uploaded = files.upload()
for fn in uploaded.keys():
print('User uploaded file "{name}" with length {length} bytes'.format(
name=fn, length=len(uploaded[fn])))
在Colab cell中输入以上代码,并运行代码,选择上传文件即可。