Setup and Series
Install Pandas and understand a Series as labelled one-dimensional data.
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.
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
EasyCreate a Series
Create a Series of three lesson minute values with named labels and print the mean.
PYTHON · starter
import pandas as pdCheck 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 inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.