classic#

astropy.table.notebook_backends.classic(table, tableid=None, css=None, display_length=50, table_class='astropy-default', show_row_index='idx')[source]#

Render the table in HTML and show it in the Jupyter notebook.

Deprecated since version 6.1: Use ipydatagrid() instead.

Parameters:
tableTable

Table to render.

tableidpython:str or python:None

An html ID tag for the table. Default is table{id}-XXX, where id is the unique integer id of the table object, id(table), and XXX is a random number to avoid conflicts when printing the same table multiple times.

table_classpython:str or python:None

A string with a list of HTML classes used to style the table. The special default string (‘astropy-default’) means that the string will be retrieved from the configuration item astropy.table.default_notebook_table_class. Note that these table classes may make use of bootstrap, as this is loaded with the notebook. See this page for the list of classes.

csspython:str

A valid CSS string declaring the formatting for the table. Defaults to astropy.table.jsviewer.DEFAULT_CSS_NB.

display_lengthpython:int, optional

Number or rows to show. Defaults to 50.

show_row_indexpython:str or python:False

If this does not evaluate to False, a column with the given name will be added to the version of the table that gets displayed. This new column shows the index of the row in the table itself, even when the displayed table is re-sorted by another column. Note that if a column with this name already exists, this option will be ignored. Defaults to “idx”.

Returns:
htmlobject

An IPython.display.HTML instance representing the given table.

Notes

Currently, unlike show_in_browser() (with jsviewer=True), this method needs to access online Javascript code repositories. This is due to modern browsers’ limitations on accessing local files. Hence, if you call this method while offline (and don’t have a cached version of jquery and jquery.dataTables), you will not get the jsviewer features.