CBSE Class 12 Informatics Practices Question 3 of 44

Data Handling using Pandas — Question 4

Back to all questions
4
Question

Question 4

Assertion (A): While creating a series using scalar values, index must be provided.

Reasoning (R): The scalar value is repeated to match the length of index.

  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.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
When creating a Series using scalar values, we must provide an index. This is because a Series requires an index to associate with each value. This scalar value shall be repeated to match the length of the index.