I am facing difficulty in downloading the kaggle data in my colab folder.
Hello @Prianka_Muralidharan ,
Welcome to the Community!!
Btw you don’t have to download any kaggle dataset for the graded assignment of Course 2 week 1.
Just run the pre-coded cell to download the dataset.
And If you want to know how to load kaggle dataset into your colab, apart from the assignment, I am writing here 2 processes.
Do the following :
Process 1:
- Download and unzip it.
- Upload the file to your drive
- Mount your google drive and authorize colab to access files from google drive.
from google.colab import drive
drive.mount('/content/drive')
- Then load the file using the file path.
Process 2:
- In kaggle, Go to your profile and click on account.
- Under A PI section, click on “Create New API Token” will download a kaggle.json that has your username and key.
- On colab, write : ! pip install -q kaggle
-
from google.colab import files
files.upload()
Upload the json file - !mkdir -p ~/.kaggle
- !cp kaggle.json ~/.kaggle/
- !chmod 600 /root/.kaggle/kaggle.json
- !kaggle datasets download -d " your dataset "
- !ls
- !mkdir “any name”
- !unzip “file name”
Hope this helps.
With regards,
Nilosree Sengupta