datatables in Jupyter notebook

datatables in Jupyter notebook

mwoutsmwouts Posts: 1Questions: 1Answers: 0


Thanks for maintaining the datatables library, this is a great library !

My use case for DT is for quickly displaying tables with data coming from R or Python.

In R I was using the DT package from cran. But in Python DT was not yet available, so I wrote a prototype for displaying tables in notebooks with datatables. First results are available at .

For now it works well, as long as the table does not have too many columns. Can I get your advice on how to improve the rendering of tables with more columns? Especially, I'd like to know
- how to get the autoWidth working? You will notice on the link above that the first table has all the columns of the same width, but the table would look nicer with adjusted widths.
- how can I get user specified widths working? Inside a Jupyter notebook they appear to work only under certain conditions, see the two examples at

Looking forward to reading you,



  • allanallan Posts: 50,034Questions: 1Answers: 7,401 Site admin

    Try adding width="100%" to your <table> tag.

    how can I get user specified widths working?

    With the number of columns in the table it is likely that the browser is overruling your defined widths to try and fit all of the content in to the space available.


Sign In or Register to comment.