A

Admin • 802.91K Points
Coach

Q. What does `df['col'].str.contains('abc')` return?

  • (A) A filtered DataFrame with 'abc'
  • (B) Boolean Series where each element tells if 'abc' exists
  • (C) List of all values that contain 'abc'
  • (D) Index of matching rows
  • Correct Answer - Option(B)
  • Views: 3
  • Filed under category Pandas
  • Hashtags:

Explanation by: Admin
`str.contains()` returns a boolean Series for string matching.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.