You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+31-33Lines changed: 31 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -51,35 +51,40 @@ If needed, Modin-spreadsheet can be installed through PyPi. ::
51
51
52
52
pip install modin-spreadsheet
53
53
54
-
What's New
54
+
Features
55
55
----------
56
-
**Column-specific options (as of 1.1.0)**:
57
-
Thanks to a significant `PR from the community <https://github.com/quantopian/qgrid/pull/191>`_, Qgrid users now have the ability to set a number of options on a per column basis. This allows you to do things like explicitly specify which column should be sortable, editable, etc. For example, if you wanted to prevent editing on all columns except for a column named `'A'`, you could do the following::
56
+
**Column-specific options**:
57
+
The feature enables the ability to set options on a per column basis. This allows you to do things like explicitly
58
+
specify which column should be sortable, editable, etc. For example, if you wanted to prevent editing on all columns
59
+
except for a column named `'A'`, you could do the following::
See the updated `show_grid <https://qgrid.readthedocs.io/en/v1.1.0/#qgrid.show_grid>`_ documentation for more information.
65
+
See the `show_grid <https://qgrid.readthedocs.io/en/v1.1.0/#qgrid.show_grid>`_ documentation for more information.
64
66
65
-
**Disable editing on a per-row basis (as of 1.1.0)**:
66
-
This feature can be thought of as the first row-specific option that qgrid supports. In particular it allows a user to specify, using python code, whether or not a particular row should be editable. For example, to make it so only rows in the grid where the `'status'` column is set to `'active'` are editable, you might use the following code::
67
+
**Disable editing on a per-row basis**:
68
+
This feature allows a user to specify whether or not a particular row should be editable. For example, to make it so
69
+
only rows in the grid where the `'status'` column is set to `'active'` are editable, you might use the following code::
**New API methods for dynamically updating an existing qgrid widget (as of 1.1.0)**:
74
-
Adds the following new methods, which can be used to update the state of an existing Qgrid widget without having to call `show_grid` to completely rebuild the widget:
76
+
**Dynamically update an existing spreadsheet widget**:
77
+
These API allow users to programmatically update the state of an existing spreadsheet widget:
**Improved MultiIndex Support (as of 1.0.6-beta.6)**:
82
-
Qgrid now displays multi-indexed DataFrames with some of the index cells merged for readability, as is normally done when viewing DataFrames as a static html table. The following image shows qgrid displaying a multi-indexed DataFrame that was returned from Quantopian's `Pipeline API <https://www.quantopian.com/tutorials/pipeline?utm_source=github&utm_medium=web&utm_campaign=qgrid-repo>`_:
84
+
**MultiIndex Support**:
85
+
Modin-spreadsheet displays multi-indexed DataFrames with some of the index cells merged for readability, as is normally
86
+
done when viewing DataFrames as a static html table. The following image shows Modin-spreadsheet displaying a
As of qgrid 1.0.3 there are new ``on`` and ``off`` methods in qgrid which can be used to attach/detach event handlers. They're available on both the ``modin_spreadsheet`` module (see `qgrid.on <https://qgrid.readthedocs.io/en/latest/#qgrid.on>`_), and on individual SpreadsheetWidget instances (see `qgrid.QgridWidget.on <https://qgrid.readthedocs.io/en/latest/#qgrid.QgridWidget.on>`_). Previously the only way to listen for events was to use undocumented parts of the API.
141
+
The Events API provides ``on`` and ``off`` methods which can be used to attach/detach event handlers. They're available
142
+
on both the ``modin_spreadsheet`` module (see `qgrid.on <https://qgrid.readthedocs.io/en/latest/#qgrid.on>`_), and on
143
+
individual SpreadsheetWidget instances (see `qgrid.QgridWidget.on <https://qgrid.readthedocs.io/en/latest/#qgrid.QgridWidget.on>`_).
137
144
138
-
Having the ability to attach event handlers allows us to do some interesting things in terms of using modin-spreadsheet in conjunction with other widgets/visualizations. One example is using modin-spreadsheet to filter a DataFrame that's also being displayed by another visualization.
145
+
Having the ability to attach event handlers allows us to do some interesting things in terms of using modin-spreadsheet
146
+
in conjunction with other widgets/visualizations. One example is using modin-spreadsheet to filter a DataFrame that's
147
+
also being displayed by another visualization.
139
148
140
-
If you previously used the ``observe`` method to respond to modin-spreadsheet events, lets see how your code might be updated to use the new ``on`` method::
149
+
Here's how you would use the ``on`` method to print the DataFrame every time there's a change made::
When you upgrade to 1.0.3, you have more granular control over which events you do an don't listen to, but you can also replicate the previous behavior of calling ``print`` every time the state of the internal DataFrame is changed. Here's what that would look like using the new ``on`` method::
See the `events notebook <https://mybinder.org/v2/gh/quantopian/qgrid-notebooks/master?filepath=events.ipynb>`_ for more examples of using these new API methods.
For people who would rather not go to another page to try out the events notebook, here are a couple of gifs to give you an idea of what you can do with it.
158
+
Here are some examples of how the Events API can be applied.
161
159
162
-
The first gif shows how you can use modin-spreadsheet to filter the data that's being shown by a matplotlib scatter plot:
160
+
This shows how you can use modin-spreadsheet to filter the data that's being shown by a matplotlib scatter plot:
163
161
164
162
.. figure:: docs/images/linked_to_scatter.gif
165
163
:align:left
@@ -168,8 +166,8 @@ The first gif shows how you can use modin-spreadsheet to filter the data that's
168
166
169
167
A brief demo showing modin-spreadsheet hooked up to a matplotlib plot
170
168
171
-
The second gif shows how events are recorded. The layout is specific to JupyterLab, which is not yet supported, but the
172
-
Events API is the same on Jupyter notebook.
169
+
This shows how events are recorded in real-time. The demo is recorded on JupyterLab, which is not yet supported, but
170
+
the functionality is the same on Jupyter Notebook.
0 commit comments