A

Admin • 833.24K Points
Coach

Q. Which method checks if a DataFrame contains only numeric values?

  • (A) df.isnumeric()
  • (B) df.applymap(lambda x: isinstance(x, (int, float))).all().all()
  • (C) df.is_numeric()
  • (D) df.has_numeric()
  • Correct Answer - Option(B)
  • Views: 27
  • Filed under category Pandas
  • Hashtags:

Explanation by: Admin

You need to apply a function to every element to check for numeric values.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.