Lecture

Creating and Inspecting Series and DataFrames

Now that you've met Pandas, it's time to build with it.

In this lesson, you’ll create actual Series and DataFrames from Python lists and dictionaries. These objects let you store, label, and organize your data in powerful ways — and Pandas makes it easy.

Let’s jump in and explore by doing.


Build a Series and a DataFrame
import pandas as pd # Create a Series of daily step counts steps = pd.Series([8000, 9200, 10200], name="Steps") # Create a DataFrame of sales records sales = pd.DataFrame({ "Product": ["Book", "Pen", "Notebook"], "Price": [12.99, 1.50, 4.75] }) print("Steps Series:\n", steps) print("\nSales DataFrame:\n", sales)

You’ll also learn how to:

  • Use .head() to preview your data
  • Use .info() to check structure and memory
  • Use .describe() for quick stats like mean and count

Try them all — they’re your data inspection tools!


What’s Next?

Watch the slide deck to get a visual feel for how Series and DataFrames behave in different scenarios.

In the next lesson, we’ll learn how to select and access specific data from these objects.

Quiz
0 / 1

Which Pandas function is used to preview the first few rows of a DataFrame?

.describe()

.info()

.head()

.tail()

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help