-df2 = df.sort(["subreddit","author","id","Year","Month","Day"],ascending=True)
+df = df.repartition("subreddit")
+df2 = df.sort(["subreddit","CreatedAt","id"],ascending=True)
+df2 = df.sortWithinPartitions(["subreddit","CreatedAt","id"],ascending=True)