Python Forum
how to import files in Google Collab wihout downloading them to PC and to Google Disk
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to import files in Google Collab wihout downloading them to PC and to Google Disk
#1
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
Reply
#2
What have you tried? Post your code in full input/output/error blocks - see BBCode to know more
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
Reply
#3
I tried nothing as my question is how to do this: I am asking for code
Reply
#4
Look this these links
4) Kaggle API in Colab
Easiest way to download kaggle data in Google Colab
Easy way to use Kaggle datasets in Google Colab
Reply
#5
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
Reply
#6
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
Reply
#7
Thank you for your answer! I need 110 Gb(
Reply
#8
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'
Reply
#9
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.
Reply
#10
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mirroring disk structures in nested dictionaries Curbie 16 2,588 21 minutes ago
Last Post: deanhystad
  DEC pack, unpack and disk-images Curbie 32 7,247 Aug-23-2024, 03:37 PM
Last Post: Curbie
Bug Python 3.12 cannot import local python files as modules sunflowerdog 25 19,831 Jul-31-2024, 01:52 PM
Last Post: sunflowerdog
  Windows Disk Cleanup Code Help Needed nal2us2 3 1,081 Jul-19-2024, 04:03 AM
Last Post: deanhystad
  New on python. Needs help with Google sheet jeromep 1 893 Apr-25-2024, 06:47 PM
Last Post: deanhystad
  Google Earth Engine Authorization Asmaalashin 0 1,538 Feb-06-2024, 08:40 PM
Last Post: Asmaalashin
  Hard disk structure like a file selection dialog malonn 2 1,757 Aug-09-2023, 09:14 PM
Last Post: malonn
  Downloading time zone aware files, getting wrong files(by date))s tester_V 9 2,838 Jul-23-2023, 08:32 AM
Last Post: deanhystad
  Integrating Google Drive in App Lahearle 0 1,052 Jul-19-2023, 05:51 PM
Last Post: Lahearle
  Google API Help? DavyThe007 0 847 Jun-11-2023, 12:21 AM
Last Post: DavyThe007

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020