QuestionQ287

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following code blocks returns a DataFrame containing only rows from DataFrame storesDF whose sqft column value is less than or equal to 25,000?

Explanation

DataFrame.filter retains rows that satisfy its Boolean condition. col("sqft") <= 25000 is a Boolean Column expression that selects values in sqft that are at most 25,000. PySpark DataFrame.filter documentation

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!