Weekend Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ac4s65

A data scientist has a Spark DataFrame spark_df.

A data scientist has a Spark DataFrame spark_df. They want to create a new Spark DataFrame that contains only the rows from spark_df where the value in column discount is less than or equal 0.

Which of the following code blocks will accomplish this task?

A.

spark_df.loc[:,spark_df["discount"] <= 0]

B.

spark_df[spark_df["discount"] <= 0]

C.

spark_df.filter (col("discount") <= 0)

D.

spark_df.loc(spark_df["discount"] <= 0, :]

Databricks-Machine-Learning-Associate PDF/Engine
  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions
buy now Databricks-Machine-Learning-Associate pdf
Get 65% Discount on All Products, Use Coupon: "ac4s65"