ExamGecko
Question list
Search
Search

Question 29 - DSA-C02 discussion

Report
Export

Consider a data frame df with columns ['A', 'B', 'C', 'D'] and rows ['r1', 'r2', 'r3']. What does the ex-pression df[lambda x : x.index.str.endswith('3')] do?

A.
Returns the row name r3
Answers
A.
Returns the row name r3
B.
Results in Error
Answers
B.
Results in Error
C.
Returns the third column
Answers
C.
Returns the third column
D.
Filters the row labelled r3
Answers
D.
Filters the row labelled r3
Suggested answer: D

Explanation:

It will Filters the row labelled r3.

asked 23/09/2024
Sergey Aleksandrov
50 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first