"abc"), '<td style="text-align:left;">abc</td>')
test_eq(td(
class MyClass:
def _repr_html_(self): return "<span>blah</span>"
'<td style="text-align:left;"><span>blah</span></td>') test_eq(td(MyClass()),
html
Some HTML Utilities
td
td (obj)
Create a table entry from string or object with html representation.
If an object is not a string, try to use its _repr_html_
method:
th
th (cells)
Create a table header
tr
tr (cells)
Create a table row
ROW
ROW (cells)
row
row (cells)
Create a table with a single row
table
table (rows, header='', cls:str='gtbook_table')
Create a table from rows
Create a table row
"a", "b"]),'<tr>\n<td style="text-align:left;">a</td>\n<td style="text-align:left;">b</td>\n</tr>') test_eq(tr([
from IPython.display import HTML
1 | 2 |
a | b |
c | d |
"a", "b"]), tr(["c", "d"])], header=th(["1", "2"]))) HTML(table([tr([
"a", "b"]) for j in range(4)])) HTML(table([tr([
a | b |
a | b |
a | b |
a | b |
import gtsam
from gtbook.display import show
= gtsam.DiscreteDistribution((0,2),"3/1")
prior HTML(row([prior, prior]))
P(0):
|
P(0):
|
ROW([prior, show(prior)])
P(0):
|