QuestionQ276

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which code block returns a DataFrame containing only rows from storesDF where the value in the sqft column is less than or equal to 25,000 OR the value in the customerSatisfaction column is greater than or equal to 30?

Explanation

PySpark combines Column predicates with the overloaded | operator for an OR condition. Parentheses around each comparison are required so Python evaluates each comparison as a Column expression before applying |.

Community Discussion

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