BuildlyBuildly
DashboardExercisesProfileHelp
Data Science/Module 2: Data Analytics/Merge & Concat1/3
Exercise·7 min·10 XP

Stack DataFrames Vertically

Context. Daily sales come in as separate DataFrames; combine them into a single table.

Your task. Write combine(dfs) that takes a list of DataFrames and returns them concatenated vertically with the index reset to 0..N-1.

Example. combine([df_mon, df_tue, df_wed]) → all rows stacked, re-indexed.

Notes. Empty list → empty DataFrame (pd.concat([]) raises, so handle that). All dfs share the same columns.

Previous
Left Join with Fallback Value
Next
CityBikes Ride Log