Skip to main content
Practice

Introduction to Pandas and DataFrames

Pandas is one of the most useful libraries in Python for working with data. It helps you organize, clean, and explore information in a format similar to Excel or Google Sheets — but with the power of Python.

Instead of using loops or complex logic, you can handle data using simple commands. The two main tools you’ll use in Pandas are:

  • Series: a one-dimensional list with labels.
  • DataFrame: a two-dimensional table (like a spreadsheet).

DataFrame

Preview: Creating a Simple DataFrame
import pandas as pd

# Create a small DataFrame from a dictionary
data = {
"Name": ["Alice", "Bob", "Charlie"],
"Age": [25, 30, 22]
}

df = pd.DataFrame(data)

print(df)

What’s Next?

Watch the slide deck for a visual breakdown of key Pandas features. In the next lesson, you'll learn how to create and inspect Series and DataFrames.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.