πŸš€ Day 12 of My Python Learning Journey



This content originally appeared on DEV Community and was authored by Aditi Sharma

Getting Started with Pandas Series

Today I explored Pandas, one of the most powerful Python libraries for data analysis. I began with the Series object, which is like a 1D labeled array.

🔹 Creating a Series

import pandas as pd

data = [10, 20, 30, 40]
s = pd.Series(data)
print(s)

✅ Output:

0 10
1 20
2 30
3 40
dtype: int64

🔹 Custom Index

s = pd.Series([10, 20, 30], index=[“a”, “b”, “c”])
print(s[“b”]) # 20

🔹 From Dictionary

data = {“apples”: 3, “bananas”: 5, “oranges”: 2}
fruits = pd.Series(data)
print(fruits)

🔹 Vectorized Operations

print(s * 2)

a 20

b 40

c 60

⚡ Interesting Facts
β€’ A Pandas Series is built on NumPy arrays (fast + efficient).
β€’ Labels (index) make data handling more intuitive.
β€’ It’s the foundation for Pandas DataFrame.

✨ Reflection
Series may look simple, but they’re the first step toward mastering data manipulation in Pandas. I can already see how useful they’ll be for analytics tasks.

Next β†’ I’ll dive into Pandas DataFrames 📊

Python #Pandas #100DaysOfCode #DataAnalytics #DevCommunity


This content originally appeared on DEV Community and was authored by Aditi Sharma