using spark 3.5.4 the following displays a table in pretty print. df is a spark data frame.
import pandas as pd df.toPandas()