What is the difference between merge and concat?
intermediateAnswer
merge combines DataFrames horizontally by matching keys, like a SQL join, with how= controlling inner, left, right or outer.
concat stacks DataFrames — rows by default, columns with axis=1 — without matching on anything. It is what you use to combine twelve monthly files into one.
The merge pitfall worth mentioning is fan-out: if the right side has duplicate keys, rows multiply and any subsequent sum is wrong. Comparing row counts before and after, or passing validate='many_to_one', catches it.
Related