What does the shape attribute of a DataFrame return?
-
A
the data types of columns
-
B
the number of missing values
-
C
a tuple of rows and columns
Correct answer
-
D
the column names
Correct answer
C. a tuple of rows and columns
17 views
Explanation
shape returns (rows, columns); dtypes returns the column types.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ