Last active
January 26, 2023 13:42
-
-
Save yasyaindra/ddb0779d79ba148f1e6ce3aef1544eeb to your computer and use it in GitHub Desktop.
downloading kaggle datasets directly to your google colab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install opendatasets | |
import opendatasets as od | |
import pandas as pd | |
from google.colab import files | |
files.upload() | |
!ls -lha kaggle.json | |
!pip install -q kaggle # installing the kaggle package | |
!mkdir -p ~/.kaggle # creating .kaggle folder where the key should be placed | |
!cp kaggle.json ~/.kaggle/ # move the key to the folder | |
!pwd # checking the present working directory | |
!chmod 600 ~/.kaggle/kaggle.json | |
!kaggle datasets list | |
!kaggle datasets download -d datasets/name -p 'your_google_drive_path' | |
!unzip '/path/datasets.zip' -d '/path/datasets' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment