技術メモ

技術メモ

This project is maintained by kino-3

Google Colaboratory のファイルのアップロード・ダウンロード

PC 経由

from google.colab import files
uploaded = files.upload()
file_name = list(uploaded.keys())[0]  # ファイル名を文字列として得る
files.download(file_name)

Google Drive 経由

Google Drive の直下の hoge ディレクトリに移動する場合。

from google.colab import drive
drive.mount('/content/drive')
%cd /content/drive/"My Drive"/hoge