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 price is greater than 0. Which of the following code blocks will accomplish this task?
Both A and B are valid ways to filter a Spark DataFrame. You could argue that A is slightly "more" correct since option B requires you to import "pyspark.sql.functions.col"
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Deuterium44
2 weeks, 4 days agoShubhamdh1
3 months agoSpark_Knight
5 months, 1 week ago[Removed]
5 months, 3 weeks ago