Printing df as DataTable, why aren't columns adjusting in width?

Hi @tvkyq;

DataTables have undergone some changes recently. Make sure you’re at 2.2, and then try something like this:

dt = DataTable(columns=[TableColumn(field=c, title=c, width=len(c)) for c in x.columns],
               autosize_mode='fit_columns',
               sizing_mode='stretch_both',
               source=ColumnDataSource(x))
1 Like