Please follow the steps below to download and use kaggle data within Google Colab

Install kaggle on Google Colab

Kaggle Account API

!pip install -q kaggle

from google.colab import files
files.upload()
# Choose the kaggle.json file that you downloaded

!mkdir '/root/.kaggle'
!cp kaggle.json '/root/.kaggle'
!chmod 600 /root/.kaggle/kaggle.json

!kaggle datasets list
# That's all ! You can check if everything's okay by running this command.

Download Data

Now you can download any dataset in kaggle. For example we will download VinBigData Original Image Dataset.

Click to the menu and click Copy API command

Kaggle Dataset API Command

Paste the command to Google Colab and run.

!kaggle datasets download -d awsaf49/vinbigdata-original-image-dataset

Unzip and using it

!unzip -q vinbigdata-original-image-dataset.zip

References

Easiest way to download kaggle data in Google Colab