A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/data-science/how-to-upload-a-dataset-in-jupyter-notebook/ below:

How to upload a dataset in Jupyter Notebook?

How to upload a dataset in Jupyter Notebook?

Last Updated : 23 Jul, 2025

Jupyter Notebook is a web-based powerful IDE tool that helps with data analysis, visualization and narrative multi-media. Uploading a dataset is a very common task when working in the Jupyter Notebook. It is widely used by data analysts, data scientists, researchers and other developers to perform data analysis, machine learning tasks and other scientific computations.

Different ways to use Jupyter Notebook

There are many different ways to use Jupyter Notebook. Let's see some of the ways:

Installing the Jupyter Notebook

Installing Jupyter is simple and improves coding and data analysis skills. Make sure Python is installed on your local machine before you start. Then use the following command to install Jupyter:

pip install jupyter

We can also use the Anaconda platform which includes Jupyter Notebook, a further option. Jupyter Notebook is also supported through extensions in well-known code editors such as VS code. whatever method you choose, these installation options provide accessibility, allowing a user to use its robust features with ease. You can install Jupyter Notebook can be used in Windows, Linux, MacOS and all the OS where Python can be installed.

How to Launch Jupyter Notebook

Jupyter Notebook is simple and its launch method makes interactive scripting and data processing possible. After we install Jupyter using pip or Anaconda, start by opening your terminal or command prompt and navigating the required directory. After typing "Jupyter notebook" press enter, which will initiate a local server, and default web browser will open up, displaying its interface where you can create new notebooks, open the existing ones, etc. Type the following command in cmd or command prompt:

jupyter notebook
Useful Features of Jupyter Notebook

One of the interesting facts is that , it conceals features that improve the data science experience.

Upload the dataset in Jupyter Notebook

Now , we will see how to upload a dataset in a Jupyter Notebook. Here we are going to see four different methods on how to upload a dataset in a Jupyter Notebook. The following methods are:

1. Using Upload Option

Another way to upload dataset is , Jupyter Notebook displays an upload button on the dashboard. This button will allow you to select and upload your dataset in the notebook. One the dataset is uploaded , you can access the file.

Read the dataset using pandas.read_csv

To read the dataset in a Jupyter Notebook , we need to follow some steps:-

Syntax : df = pd.read_csv('dataset.csv')

Syntax: df.head()

Syntax: df.tail()

For example,

Python3
df = pd.read_csv('/content/drive/MyDrive/Train_Dataset.csv')
df.head()

Output:

Output

2. Using Absolute Filepath

Another way to read the dataset in the notebook is by using an Absolute file path. You can provide the full path of the dataset if the dataset is located in different location or directory. For example,

Syntax: df = pd.read_csv('path/to/the/dataset.csv')

3. Read Non-CSV formats

You can also use different libraries for Non - CSV formats like Excel, JSON , etc.

Syntax: df = pd.read_excel('file_path')

Syntax: df = pd.read_json('file_path')

These are some of the ways that can be used to upload a dataset in a Jupyter Notebook. Keep in mind , the method you choose will always depend on the type of the dataset and the location of the dataset. As a result, the capacity to upload datasets within jupyter notebook is a fundamental capability that enables data analysts and researchers to engage in through analysis. Being a user friendly interface , its easier for a user to work on notebook.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4