Open In App
Related Articles

How to Download Kaggle Datasets into Jupyter Notebook?

Improve Article
Save Article
Like Article

In this article, we will see how to Download Kaggle Datasets using Jupyter Notebook. Here, we are going to cover two different methods to start working with Jupyter Notebook. In the first method, we will use Kaggle API to download our dataset, and after that, we are good to go to use our dataset. In another method, we manually download from the Kaggle website and use our dataset for our production or analysis data.

Method 1: Downloading Kaggle Dataset in Jupyter Notebook

Step 1: Download and Install the required packages. 

!pip install opendatasets
!pip install pandas

Step 2: Visit Go to your profile and click on account. 

Kaggle website dataset

Kaggle website dataset 

Step 3: On the following page you will see an API section, where you will find a “Create New API Token” click on it, and it will download a kaggle.json file in which you will get your username and key. we will use username and key in our next step.


Step 4: Open your Jupyter Notebook, Import the opendatasets library, and download your Kaggle dataset by pasting the link on it.


import opendatasets as od
import pandas



Step 5: Now we are ready to use our dataset. 


import pandas as pds
# reading the XLSX file
file =('Acoustic_Extinguisher_Fire_Dataset/\
newData = pds.read_excel(file)
# displaying the contents of the XLSX file




Method 2: By manually downloading the Kaggle dataset

Step 1: Visit the Kaggle website and Select the Dataset tab.


Step 2: Select any Dataset and Click on Download.


Step 3: The downloaded file will be in Zip form, Unzip it.

Step 4: Upload to Your Jupyter Notebook.


Step 5: Now you are ready to use your Kaggle dataset.


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 23 May, 2023
Like Article
Save Article
Similar Reads
Related Tutorials