Can someone help me with downloading Kaggle dataset on my Colab Notebook? I am new to Colab.
You can use the following method to download any kaggle dataset to your Colab notebook.
kaggle.json
will be downloaded to your computer.Now open your Colab notebook and copy the following snippet to a cell.
from google.colab import files
files.upload()
After executing this upload the kaggle.json
file.
Install the kaggle API using !pip install -q kaggle
and move kaggle.json
file to ~/.kaggle
!mkdir -p ~/.kaggle
!cp kaggle.json ~/.kaggle/
Now you can download the dataset to your Colab notebook by copying the API command of the dataset that you want to download. For example:
!kaggle competitions download -c titanic
The dataset should get downloaded to your notebook after this. Happy Coding.