Skip to course content
Free course

Python Foundations / Module 9 / Series, DataFrames, Rows, and Columns

Module 9 lesson

Series, DataFrames, Rows, and Columns

Unit ID: M09-U00 Estimated active time: 20-30 minutes

A DataFrame is a labelled two-dimensional table. Each row is one observation under the task's rules. Each column is one named variable. A Series is one labelled one-dimensional sequence, often one DataFrame column.

import pandas as pd

activity = pd.DataFrame(
    {"learner_id": ["L01", "L02"], "minutes": [40, 35]}
)
print(activity.shape)
print(activity.columns.tolist())

Before cleaning, state what one row represents. If that meaning is unclear, duplicate checks and grouped summaries can be wrong.

Practice: state the row meaning, column meaning, shape, and likely key for a table where each learner has one row per module.