KnowledgeBoat Logo
|

Informatics Practices

Assertion. Arithmetic operations on two series objects take place on matching indexes.

Reason. Non-matching indexes are removed from the result of arithmetic operation on series objects.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

Python Pandas

2 Likes

Answer

A is true but R is false.

Explanation
Arithmetic operations on two Series objects take place on matching indexes. When performing operations on objects with non-matching indexes, Pandas aligns the indexes and adds values for matching indexes, resulting in NaN (Not a Number) for non-matching indexes in both objects.

Answered By

3 Likes


Related Questions