0
点赞
收藏
分享

微信扫一扫

在colab里怎样读取google drive数据


参考: ​​python - Google Colab: how to read data from my google drive? - Stack Overflow​​

其他答案我都试过, 效果不行, 但是以下work for me:

What I have done is first:

from google.colab import drive
drive.mount('/content/drive/')

Then

%cd /content/drive/My Drive/Colab Notebooks/

After I can for example read csv files with

df = pd.read_csv("data_example.csv")

If you have different locations for the files just add the correct path after My Drive

 

举报

相关推荐

0 条评论