πŸ“Š How to Load a Dataset in a Jupyter Notebook Using Pandas

μž‘μ„±μž

μΉ΄ν…Œκ³ λ¦¬:

← ν”Όλ“œλ‘œ
DEV Community · Sana Noor · 2026-08-10 개발(SW)
Cover image for πŸ“Š How to Load a Dataset in a Jupyter Notebook Using Pandas

Sana Noor

When you’re starting your Machine Learning journey, one of the first things you’ll need to learn is how to load your dataset into your Jupyter Notebook.

Let’s learn how to do it in the simplest way. πŸš€

🐍 Step 1: Import Pandas
import pandas as pd

Here, we’re importing the Pandas library and giving it the shorter name pd.

Pandas is a popular Python library used for data analysis and manipulation. It provides useful tools for working with structured data such as CSV files.

πŸ“‚ Step 2: Load the Dataset
df = pd.read_csv("Dataset.csv")

Let’s break this line down:

πŸ”Ή pd β†’ The alias we gave to Pandas.

πŸ”Ή read_csv() β†’ A Pandas function used to read data from a CSV file.

πŸ”Ή “Dataset.csv” β†’ The path or filename of our dataset.

πŸ”Ή df β†’ A variable that stores the resulting Pandas DataFrame.

A DataFrame is basically a table of rows and columns that makes it easier to work with our dataset.

You can also load a CSV using a URL:

df = pd.read_csv("https://example.com/dataset.csv")

πŸ”** Step 3: Take a Quick Look at Your Data**

After loading the dataset, you can check the first few rows:

df.head()

This is a very useful first step because it lets you quickly understand what your dataset looks like.

πŸ’‘ In short:
import pandas as pd

df = pd.read_csv("Dataset.csv")

df.head()

That’s it! πŸŽ‰

You’ve successfully loaded your dataset into a Jupyter Notebook and can now start exploring and preprocessing your data.

I’m also learning these concepts while building my final-year Machine Learning project, so I’ll continue sharing what I learn along the way.

If you’re also learning Python or Machine Learning, feel free to share your questions in the comments. πŸ‘‡

See you in the next lesson! πŸš€

Python #Pandas #MachineLearning #DataScience #JupyterNotebook #PythonForBeginners #LearningInPublic #100DaysOfCode

μ›λ¬Έμ—μ„œ 계속 β†—

μΆ”μΆœ λ³Έλ¬Έ Β· 좜처: dev.to Β· https://dev.to/sana_noor/how-to-load-a-dataset-in-a-jupyter-notebook-using-pandas-1o5c

μ½”λ©˜νŠΈ

λ‹΅κΈ€ 남기기