AnthonyAnand
Databricks Partner

@Kaz1 The reason could be that display(dataframe) behaves differently depending on whether it is showing a simple table or a visualization with server-side aggregation. When you click "Aggregate over more data," Databricks tries to re-run the underlying query with a specialized aggregation layer with all the data.

If you need to aggregate over the entire dataset, the most robust way to avoid UI errors is to let Spark handle the aggregation (with pyspark or sql) before going for the display() with visualization.




View solution in original post