Я часто использую 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 | |
+-----------------------------------------------+-----+