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
  Google Earth Engine Authorization Asmaalashin 0 328 Feb-06-2024, 08:40 PM
Last Post: Asmaalashin
  Hard disk structure like a file selection dialog malonn 2 761 Aug-09-2023, 09:14 PM
Last Post: malonn
  Downloading time zone aware files, getting wrong files(by date))s tester_V 9 961 Jul-23-2023, 08:32 AM
Last Post: deanhystad
  Integrating Google Drive in App Lahearle 0 440 Jul-19-2023, 05:51 PM
Last Post: Lahearle
  Google API Help? DavyThe007 0 389 Jun-11-2023, 12:21 AM
Last Post: DavyThe007
  (Python) Pulling data from UA Google Analytics with more than 100k rows into csv. Stockers 0 1,170 Dec-19-2022, 11:11 PM
Last Post: Stockers
Lightbulb Help using Google Sheets matheuspimenta 0 687 Dec-15-2022, 05:36 PM
Last Post: matheuspimenta
  updating Google spreadsheet with gspread mgallotti 0 1,049 Sep-30-2022, 11:26 PM
Last Post: mgallotti
  Deploy Python to Cloud and save output to Google Drive chandrabr80 2 1,524 Jan-25-2022, 06:56 AM
Last Post: ndc85430
  Cannot import google KEIKAS 2 4,655 Jan-10-2022, 07:32 PM
Last Post: KEIKAS

Forum Jump:

User Panel Messages

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