KnowledgeBoat Logo
|

Informatics Practices

Assertion (A): The shape attribute returns the number of rows and number of columns available in dataframe.

Reasoning (R): The shape attribute returns the values in the form of list.

  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

3 Likes

Answer

A is true but R is false.

Explanation
The shape attribute of a Pandas DataFrame returns the number of rows and the number of columns in the DataFrame. The shape attribute returns the values in the form of tuple.

Answered By

1 Like


Related Questions