我经常使用dataframe.show()以易于理解的方式将表格数据输出到控制台。谁能建议一个等效于show()的支持列内自动换行的东西?
Seq(
("a very large amount of text", 256),
("a really large amount of text", 15015),
("a an absolutely enormous amount of text, too much to contain in one line", 2131)
).toDF("word", "count").show(false)
+------------------------------------------------------------------------+-----+
|word |count| +------------------------------------------------------------------------+-----+
|a very large amount of text |256 |
|a really large amount of text |15015|
|a an absolutely enormous amount of text, too much to contain in one line|2131 | +------------------------------------------------------------------------+-----+
I would prefer something that will return:
+-----------------------------------------------+-----+
|word |count|
+-----------------------------------------------+-----+
|a very large amount of text |256 |
+-----------------------------------------------+-----+
|a really large amount of text |15015|
+-----------------------------------------------+-----+
|a an absolutely enormous amount of text, |131 |
|too much to contain in one line | |
+-----------------------------------------------+-----+