在(Py)Spark SQL中的窗口函数内按分组
To understand this problem, imagine that a group of people, at time t1, are in a certain location L. You are interested in knowing where all those people were at time t0.
我在这里有一个示例代码来引导练习:
row = Row("user_id", "start", "location_id")
df = spark.sparkContex...