How to Download Dataset from Kaggle?

In this article, I will show you the way to download datasets from Kaggle with kaggle API.

# install kaggle api to fetch dataset
pip install kaggle --upgrade
# move your API token to ~/.kaggle/kaggle.json
# you can check the following link to set up your kaggle api token

# https://github.com/Kaggle/kaggle-api
# Download the dataset and use unzip command according to your folder structure
kaggle datasets download userName/datasetName
Example: kaggle datasets download kneroma/tacotrashdataset

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store