如何使用 Apache Toree - Scala 内核增加 Jupyter 笔记本的单元格宽度?
通常
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
确实不行。
如何使用 Apache Toree - Scala 内核增加 Jupyter 笔记本的单元格宽度?
通常
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
确实不行。
In ~/.jupyter/custom/custom.js
(to avoid wrap - horizontal scroll):
$([IPython.events]).on('app_initialized.NotebookApp', function(){
IPython.CodeCell.options_default['cm_config']['lineWrapping'] = true;
});
And added this in ~/.jupyter/custom/custom.css
(to use all width):
.container { width:100% !important; }
pre, code, kbd, samp {
white-space: pre;
}
These two tricks help to make the Spark SQL DataFrame show() method a little more "palatable" by aligning columns to effectively kill word wrap and giving more width to the view. If these files do not exist, try creating them.