Uploading Data to colab

Hi everyone,
12%20PM 50%20PM

I have been trying to upload folder to colab then download urls from CSV, it’s been hours and no resolution! i tried to follow this link colab_fastai link

I uploaded the folder to gdrive and use the code in the screenshot.

When i run on local jupyter the code works, but seems like it’s not reading it probably on collab. So far it looks like its making the directory but not reading the csv in like it is on the local jupyter notebook shown in screenshot below

Solved!

I used this code and made a dir,

from google.colab import drive
drive.mount(’/content/gdrive’)

Hi Ferhat,

Could you pl. share the code that is working? either screen shot or through copy/paste.

It’s hard to follow how you fixed the bug. Thank you!

When working in colab if you want to get data to and from your google drive, you need to mount it. The code to do this is:

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

From here if you want to use path with it, you do
path = Path('gdrive/My Drive/my/directory/path/to/file)

Does this make sense @wjlgatech?

1 Like