Registry / data / ipyaggrid

ipyaggrid

JSON →
library0.5.4pypypi✓ verified 84d ago

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
INSTALL
IMPORT
SIG · IPYAGGRID
I
ipyaggrid
datapythonv0.5.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Grid
from ipyaggrid import Grid
from ipyaggrid.grid import Grid
Grid is directly importable from the top-level package, not from a submodule.

Creates a basic ag-Grid widget with three columns, showing sorting and filtering enabled.

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
Debug
Known issues
gotchaipyaggrid 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.
affects: >=0.5.0
breakingIn 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.
affects: >=0.5.0
deprecatedThe `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.
affects: >=0.5.0
gotchaWhen 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.
affects: <0.5.2
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ipyaggrid'
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).
JavaScript error: ag-Grid: license key not found, using community edition...
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.
TypeError: Grid.__init__() got an unexpected keyword argument 'quick_filter'
The `quick_filter` parameter was removed in version 0.5.0.
fix
Use `grid_options['quickFilterText']` instead of the `quick_filter` argument.
ValueError: The truth value of a DataFrame is ambiguous.
Passing a pandas DataFrame directly to `data` parameter without converting to dict.
fix
Convert the DataFrame to dict: `data=df.to_dict('list')`.
Upgrade
Version history
0.5.4latest on PyPI · released Apr 29, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ipyaggrid — pip install ipyaggrid · libregistry