itables
itables copied to clipboard
Is there a plan to add columnControl feature to itables?
Is there a plan to add columnControl feature to itables? [(https://datatables.net/blog/2025/columncontrol)]
Hey @TimWingers , oh it's great to see that columnControl is out! Yes definitely! I'll wrap-up the current changes and then proceed with this one in v2.5.0 if that sounds ok?
By the way if you are willing to make a PR this part of the doc could possibly get you started: https://mwouts.github.io/itables/custom_extensions.html#creating-a-custom-datatables-bundle
Hi! Thanks for the reply. I'll be waiting for this update. For me, I found itables to be a powerful alternative to classic pandas tables. Here are the settings I now run my jupyter notebooks with.
import itables
from itables import show
itables.options.maxBytes = "4096KB" # Cache size (max rows)
itables.options.lengthMenu = [15, 10, 20, 25, 30] # Row selection menu
itables.options.scrollX = True # Horizontal scrolling
itables.options.autoWidth = True # Auto width of columns
itables.options.order = [[1, "desc"]] # Primary sorting (descending second column)
itables.options.classes = "display nowrap stripe hover cell-border row-border order-column compact"
itables.options.dom = "Brtip" # B = Buttons, f = filter, r = processing, t = table, i = info, p = pagination
itables.options.buttons = ["pageLength", "copy", "csv", "excel", "colvis"] #Add export and column visibility buttons
itables.options.column_filters = "footer" # Filters at the bottom of columns
itables.options.footer = True # Draw footer under table
itables.options.warn_on_undocumented_option = False
itables.options.columnDefs=[{"className": "dt-center", "targets": "_all"}] #Center values in all columns
itables.options.text_in_header_can_be_selected=False
# Itables changes all pandas dataframe (df) visualizations by default
itables.init_notebook_mode()
Hi @TimWingers , I have prepared a PR that adds the extension to ITables.
Currently it works only offline (connected=False, the default). If you could give it a try, installation instructions are at #428 , and there is a pointer to the future documentation, too! Let me know how it works for you - thanks!
I have merged the corresponding PR, you can now see the column control extension in the docs.
A development build is available at https://github.com/mwouts/itables/pull/431#issuecomment-3238398601. By the way that build also has support for the new itables.toml configuration file (meaning that you can move your defaults there).
If you have a chance to test it your feedback is welcome!