Server commands - IUHEPandML/DataAnalysis GitHub Wiki
To download a dataset from Kaggle using the terminal, you can follow these steps:
#Install the Kaggle CLI (Command Line Interface) by running the following command in your terminal:
pip install kaggle
#Generate a Kaggle API token by going to your Kaggle account settings pageand clicking on the "Create New API Token" #button. This will download a file named "kaggle.json" to your computer.
#Move the "kaggle.json" file to the location "~/.kaggle/kaggle.json" on your computer by running the following command in #your terminal:
mkdir ~/.kaggle mv ~/Downloads/kaggle.json ~/.kaggle/kaggle.json
#(Note: replace "~/Downloads" with the path where the "kaggle.json" file was downloaded.)
#Navigate to the Kaggle dataset page that you want to download and copy the dataset's API command.
#Run the following command in your terminal, replacing "API_COMMAND" with the API command you copied in step 4:
kaggle datasets download -d API_COMMAND
#This will start the download process for the dataset, and it will be saved in your current working directory.