天天看点

在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/      
df = pd.read_csv("data_example.csv")