As guided by @Jxc in comments, I was able to to it with help of adding monotonically_increasing_id() before window operation.
Here is the example
df= df.withColumn("idx", monotonically_increasing_id())
w= Window.partitionBy("user-id").orderBy('C1','idx')
CLICK HERE to find out more related problems solutions.