CBSE Class 12 Informatics Practices Question 52 of 101

Python Pandas — II — Question 7

Back to all questions
7
Question

Question 7

Function add() and operator + give the same result.

Answer

True

Reason — In pandas, both the '+' operator and the add() function can be used to perform element-wise addition between two DataFrames, resulting in the same output. The syntax for the '+' operator is <DF1> + <DF2>, while the syntax for the add() function is <DF1>.add(<DF2>), which is equivalent to <DF1> + <DF2>.