pd.concat stacks tables. Give it a list:
pd.concat([w1, w2, w3], ignore_index=True)
Rows from each table are placed one after another, matching columns by name. Three things to know:
- The index repeats. Each file had its own 0, 1, 2..., and concat keeps them, so label 0 now appears three times.
ignore_index=True renumbers the result from 0.
- Columns that only some tables have are kept and filled with
NaN for the others. Count those gaps before you trust a column.
- Where did each row come from? Add a column before stacking,
w1.assign(week=1), so you can still tell the files apart afterwards.
axis=1 puts tables side by side instead, matching rows by index label. (There used to be a DataFrame.append method; it has been removed, and concat replaces it.)