Is there better way to display entire Spark SQL DataFrame?

后端 未结 7 706
轻奢々
轻奢々 2021-01-30 20:53

I would like to display the entire Apache Spark SQL DataFrame with the Scala API. I can use the show() method:

myDataFrame.show(Int.MaxValue)
         


        
7条回答
  •  梦如初夏
    2021-01-30 21:48

    Nothing more succinct than that, but if you want to avoid the Int.MaxValue, then you could use a collect and process it, or foreach. But, for a tabular format without much manual code, show is the best you can do.

提交回复
热议问题