Python Forum

Full Version: how to import files in Google Collab wihout downloading them to PC and to Google Disk
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I import files in Google Collab wihout downloading them to PC and to Google Disk?
There is data on kaggle.com and there is my notebook on Google collab. How can I import files using only website link?
I don`t want to use space for a huge amount of data in Google disk and my PC
What have you tried? Post your code in full input/output/error blocks - see BBCode to know more
I tried nothing as my question is how to do this: I am asking for code
Thanks! I saw similar recomendations. Unfortunately their code results in downloading files to Google drive. I want to use only links to web sites, without downloading
They don't make it easy, and may not be quite possible. However, you can create a notebook on the Kaggle site using their notebook platform and access tables that way. From what I could see you could save up to 5 Gb of temp info in your account there as well for intermediate results. So, maybe not using colab, but using something similar
Thank you for your answer! I need 110 Gb(
You can import a dataset from Kaggle to the colab without downloading it on the Pc and with impressive high speed. Follow the steps below:
1. Goto the Kaggle account and generate a token. You can see a kaggle.json file downloaded.
2.Mount your hard disk
3.upload the kaggle.json file.
4.Next type this and run in a cell
!pip install -q kaggle

5.Next run this code,and only once
! mkdir ~/.kaggle
! cp kaggle.json ~/.kaggle/
6.Now download using this command.I am going to paste an example with the code
!kaggle [i]datasets[/i] download -d [i]alessiocorrado99/animals10[/i]
Note that the text written in italic can be different for you.Here i am downloading a dataset from dataset section by using the API command which you can get from the kaggle.It can be like this too
! kaggle competitions download -c 'name-of-competition'
That looks like it downloads the files to the Google drive, which he is trying to avoid. I believe he is trying to access the files in place without having to use local or cloud storage. Correct me if wrong.
Yes, jefsummers is right. This will result in downloading.
Also, the last way is better, in my opinion, as for my competion I was not be able to find dataset in the list of datasets. But dataset was attached to competion

However I still hope to find way without downloading