Project 24: Events Concatenator
Data Analyst
Builds on these lessons
Current Task
Objective
pd.concat() stacks DataFrames on top of each other (or side by side) — unlike merge, it doesn't match on a key, it just combines them.
Task: concatenate a January and February events DataFrame into one, with a fresh index, and print it.
index.py
import pandas as pd
january = pd.DataFrame({'event': ['New Year']})
february = pd.DataFrame({'event': ["Valentine's"]})
all_events = pd.concat([january, february], ignore_index=True)
print(all_events)
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview