1.获取kaggle API Token
account-settings-API,这时候会下载一个kaggle.json,然后将里面的内容{username:.......}复制一份
(个人怕之后找不到另外放了一份到Google云端硬盘中)
2.在colab中绑定kaggle
!pip install -U -q kaggle
!mkdir -p ~/.kaggle
!echo '{"username":"your gaggle username","key":"your key"}' > ~/.kaggle/kaggle.json
!chmod 600 ~/.kaggle/kaggle.json
3. 获取API command
!kaggle datasets download -d saurabhshahane/fake-news-classification
4,解压
!unzip '/content/fake-news-classification.zip' -d '/content'
参考
关于google 在colab中使用kaggle数据集的问题*_kaggle username-CSDN博客