How to import kaggle Data set in google colab?

preview_player
Показать описание
Steps to follow:
Step 1: Sign in to google and open Google Colab notebook
Step 2: Install dependencies by executing the following command
!pip install kaggle
Step 3: Go to your kaggle account and sign in
---go to my account option
---Now scroll down and there will be an option named "create new API token"
following command:

Step 5: Now change the directory
!mkdir -p ~/.kaggle

and also change the permission

Step 7: Now go back to google colab and paste the command and add "!" exclamation mark as a prefix and run it. Wait for a moment and the data set will be downloaded in a zip file.

Step 8: Since the dataset is in zip file, we need to extract it. To do that first we need zip file pacakages.
!pip install zip_files

Step 9: Now extract the file by using the following code
from zipfile import ZipFile
with ipfile(file_name,'r') as zip:
print('Done')
That's it. Your file will be extracted.
Рекомендации по теме
Комментарии
Автор

Thanks for the video. It was very helpful.

ganeshsuriyanarayanan
Автор

vaiya last er 2nd line

sothik file name disi taw IndentationError dekhacche

mahmudaakterdola
Автор

Bhaiya I tried to download a different dataset. But thats showing "403 forbidden". What can I do for solution?

jumana.ahmed