在Jupyter Notebook中使用Pandas表的IPython.display时如何在单元格周围包括边框 [英] How to include border around cells when using IPython.display of Pandas table in Jupyter Notebook

查看:242
本文介绍了在Jupyter Notebook中使用Pandas表的IPython.display时如何在单元格周围包括边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python 3.4中,单元格很容易看到,因为它们周围有黑色边框.在Python 3.5中,此边框已被更细微的白色/灰色阴影所取代,这使单元在视觉上融合在一起.我想添加一个黑色的边框,例如曾经使用的Python 3.4.这可能吗?

In Python 3.4, the cells were easy to see because they had a black border around them. In Python 3.5, the this border has been replaced with a more subtle white/grey shading, which makes the cells blend together visually. I want to add a black border like Python 3.4 used to use. Is this possible?

推荐答案

您可以在.jupyter\custom\custom.css文件中添加以下内容:

You can add something like this to your .jupyter\custom\custom.css file:

.rendered_html table, .rendered_html th, .rendered_html tr, .rendered_html td {
  border: 1px  black solid !important;
  color: black !important;
}

您可以在此处中了解有关自定义Jupyter笔记本的更多信息. >.

You can read more about customizing jupyter notebook here.

这篇关于在Jupyter Notebook中使用Pandas表的IPython.display时如何在单元格周围包括边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆