🎓 PYSPARK CERTIFICATION LEARNING STUDIO
PySpark Practice Test 04
50 Comprehensive Questions (Questions 151–200)
0 / 50 Mastered
Question 151of 50
🤔 Step: Reason & Select
Input DataFrame:
+------+
|salary|
+------+
| 1000|
| 1000|
| 2000|
+------+Code:
from pyspark.sql.functions import rank
from pyspark.sql.window import Window
w = Window.orderBy("salary")
df.withColumn("r", rank().over(w)).select("r")What will be the sequence of rank values output by this operation?
💡
Think Before You Check: Take a moment to reason through the scenario, evaluate architectural trade-offs, and choose your option before checking.
Question 1 of 50
Question Navigator (Test 04)0 / 50 Checked
Mastered (0) Needs Review (0) Unchecked (50) Current