[IPython-User] Notebook display of nested HTML tables?
Gardner Pomper
gardner@networknow....
Thu Aug 30 15:49:44 CDT 2012
I have some objects that I would like to display in the notebook using
the _repr_html_() method. I use this frequently (I am on 0.13) and it
has worked fine for simple tables. My latest effort is a table, of
which each cell is a table. Sample html is shown:
<table border="1">
<tr>
<td valign="top">
<table border="1">
<tr>
<th>Column 1</th>
</tr>
<tr>
<td>label 1</td><td>value 1</td>
</tr>
</table>
</td>
<td valign="top">
<table border="1">
<tr>
<th>Column 2</th>
</tr>
<tr>
<td>label 2</td><td>value 2</td>
</tr>
<tr>
<td>label 2</td><td>value 2</td>
</tr>
</table>
</td>
</tr>
</table>
If I save this html in a file and load it into the browser, it works
ok. But if I do it in IPython, the child tables seem to be aligned in
the middle vertically, and have a whole bunch of whitespace around
them.
I am using IPython 0.13 on red hat linux. I have done now special
setup for any kind of configuration files. I have even tried setting a
CSS style using IPython.core.display Javascript with no effect.
Why is IPython rendering my nested html tables funny, but my simple tables fine?
- Gardner
More information about the IPython-User
mailing list