KnowledgeBoat Logo
|

Informatics Practices

Assertion (A): We can add a new column in an existing dataframe using .at or .loc methods.

Reasoning (R): When we reassign new values to an existing column in a dataframe, the previous values are overwritten.

  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 Data Handling

1 Like

Answer

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

Explanation
We can add a new column in an existing dataframe using at or loc methods. When we reassign new values to an existing column in a dataframe, the previous values are overwritten.

Answered By

3 Likes


Related Questions