【发布时间】:2015-10-25 22:34:10
【问题描述】:
是否可以自定义单元格颜色和笔记本输出,例如 IJulia 笔记本中的数据框(使用 julia)。例如,在python中,我们可以这样做
Python 笔记本
from IPython.core.display import HTML
css = open('style.css').read()
HTML('<style>{}</style>'.format(css))
style.css
table.dataframe th:not(:empty) {
background-color: #FFCCFF;
text-align:left;
font-weight: bold;
font-family: monospace;
}
table.dataframe tr:nth-child(2) th:empty {
border-left: none;
border-right: 1px dashed #888;
}
table.dataframe td {
border: 2px solid #ccf;
background-color: #f4f4ff;
}
【问题讨论】: