ipyaggrid
raw JSON → 0.5.4 verified Mon Apr 27 auth: no python
ipyaggrid is a Jupyter widget that brings the ag-Grid data grid into Jupyter notebooks. It provides full ag-Grid functionality, including sorting, filtering, editing, and exporting. Current version is 0.5.4, and the library is maintained by Widgetti. Release cadence is irregular.
pip install ipyaggrid Common errors
error ModuleNotFoundError: No module named 'ipyaggrid' ↓
cause The package is not installed or is installed in a different environment.
fix
Run
pip install ipyaggrid in the correct environment (e.g., Jupyter kernel's Python). error JavaScript error: ag-Grid: license key not found, using community edition... ↓
cause ipyaggrid expects an enterprise license key but none provided, and defaults to community with a watermark message in the console.
fix
Add 'licenseKey': '__community__' to grid_options to suppress the warning if using community edition.
error TypeError: Grid.__init__() got an unexpected keyword argument 'quick_filter' ↓
cause The `quick_filter` parameter was removed in version 0.5.0.
fix
Use
grid_options['quickFilterText'] instead of the quick_filter argument. error ValueError: The truth value of a DataFrame is ambiguous. ↓
cause Passing a pandas DataFrame directly to `data` parameter without converting to dict.
fix
Convert the DataFrame to dict:
data=df.to_dict('list'). Warnings
gotcha ipyaggrid uses ag-Grid Enterprise features by default, but if you only have the community edition, set `grid_options['licenseKey'] = '__community__'` to avoid console watermark warnings. ↓
fix Add 'licenseKey': '__community__' to grid_options when using community edition.
breaking In version 0.5.0, the `data` parameter changed from expecting a list of dicts to expecting a dict of columns (column-oriented format). Old code using list of dicts will break. ↓
fix Convert data from list of dicts to dict of lists. Use pandas DataFrame and then `df.to_dict('list')` if needed.
deprecated The `quick_filter` argument in Grid constructor is deprecated since 0.5.0. Use `grid_options['quickFilterText']` instead. ↓
fix Set `grid_options['quickFilterText'] = 'your_text'` and remove `quick_filter` argument.
gotcha When exporting to CSV or Excel using the built-in buttons, the exported file may have the wrong extension if not set properly. Ensure you set `exportDataAsCsv()` or `exportDataAsExcel()` via JavaScript. ↓
fix Upgrade to 0.5.2 or later where defaults are fixed.
Imports
- Grid wrong
from ipyaggrid.grid import Gridcorrectfrom ipyaggrid import Grid
Quickstart
from ipyaggrid import Grid
grid = Grid(
data={
'make': ['Toyota', 'Ford', 'Porsche'],
'model': ['Celica', 'Mondeo', 'Boxster'],
'price': [35000, 32000, 72000]
},
grid_options={
'columnDefs': [
{'field': 'make', 'sortable': True, 'filter': True},
{'field': 'model', 'sortable': True, 'filter': True},
{'field': 'price', 'sortable': True, 'filter': True}
]
}
)
grid