Hubert-Dudek
Databricks MVP

Try to replace .to_pandas() with .to_pandas_on_spark(). This way, you will ensure that the dataframe is processed distributed among the workers.


My blog: https://databrickster.medium.com/