Pandas & Data Analysis·Pandas from first Series to analysis project

Setup and Series

Install Pandas and understand a Series as labelled one-dimensional data.

Beginner 12 min read Lesson 1 of 300 Challenge included
What you will be able to do
  • Install pandas and numpy in a virtual environment.
  • A Series has values and an index.
  • Use .head() and .describe() to inspect.
  • Prefer vectorised operations over Python loops.

In plain English

A Series is a column with an index. The index makes alignment possible: operations line up by label, not position. That is the idea that makes the rest of Pandas make sense.

series.pyPython
import pandas as pd

minutes = pd.Series([12, 18, 9], index=['HTML', 'CSS', 'SQL'])
print(minutes)
print(minutes.mean())
print(minutes[minutes >= 12])
Your turn

Create a Series

Easy

Create a Series of three lesson minute values with named labels and print the mean.

PYTHON · starter
import pandas as pd
Check your understanding before moving on.
Knowledge checkQuestion 1

What makes a Series different from a plain list?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: DataFrames
Lesson 1 of 300 · 0% of course