Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Master Data Science with Python

Lesson 17 of 60 · python

Series: The One‑Dimensional Pandas Object

Duration: 15 minutes

Series Deep Dive

A Series is essentially a labeled array.

Creating Series from different sources

# From a list
s1 = pd.Series([100, 200, 300])

# From a dict (keys become index)
prices = {'apple': 0.99, 'banana': 0.5, 'cherry': 2.5}
s2 = pd.Series(prices)
print(s2)

Accessing elements

print(s2['banana'])   # 0.5
print(s2.iloc[0])     # 0.99 (positional)

Vectorized operations

print(s2 * 1.1)   # increase all prices by 10%

Handling missing data in Series

s3 = pd.Series([1, None, 3])
print(s3.isna())
print(s3.fillna(0))

Info

Series is a handy wrapper when you need a single column with custom indexing.

Previous: Introduction to PandasNext: DataFrames: Tabular Data in Pandas