QuestionQ50
VerifiedDeveloping Apache Spark™ DataFrame/DataSet API ApplicationsA developer wants to refactor older Spark code to use built-in functions introduced in Spark 3.5.0.
The developer finds the following existing DataFrame code:
import pyspark.sql.functions as F
min_price = 110.50
result_df = prices_df \
.filter(F.col("spot_price") >= F.1it(min_price)) \
.agg(F.count ("*"))
Which code block should the developer use to refactor the code?
Community Discussion