What distinguishes pd.concat from DataFrame.merge?
-
A
concat joins frames on shared keys
-
B
merge stacks frames along an axis
-
C
merge needs identical column names
-
D
concat stacks frames along an axis
Correct answer
Correct answer
D. concat stacks frames along an axis
14 views
Explanation
concat glues objects along an axis, while merge performs database-style joins on common keys.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ