I have a dataframe as follow:
from pyspark.sql import functions as f from pyspark.sql.window import Window df = spark.createDataFrame([ {"groupId":&q