I have a pandas dataframe that I store on disk as a GZIP. On RAM its around 90GB, and when I saved it as gzip using pandas.to_parquet, it compresses to around 3GB.
I recently sorted it using pandas.sort_values on a different column, and all of the sudden this size on disk when I save it using the same method is 60GB.
Why is that happening and is there a different method of sorting / saving to prevent this?