quantopian / qgrid

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Apache License 2.0
3.04k stars 425 forks source link

Allow set_defaults to set a default column definition #344

Open JohnOmernik opened 3 years ago

JohnOmernik commented 3 years ago

Environment

All

Description of Request

When trying to use qgrid as my default datagrid display, one thing I often do is hide the index column. (This can be done using the column_definitions when using show_grid)

However, when using qgrid.enable and qgrid.set_defaults, I can only set grid_options and column_options, not column_definitions.

Now, I can probably understand why that makes sense, however, and in relation to #122 I think index display should be first class grid_option. I can set the index to be hidden using the workaround in #122, but if it were a grid option to not display the index, I could then set it in defaults, rather than provide the ability to set column_definitions in defaults (which I agree doesn't make sense. )