diff --git a/README.rst b/README.rst index a5b999e2..6ffcf66c 100644 --- a/README.rst +++ b/README.rst @@ -51,47 +51,6 @@ If needed, Modin-spreadsheet can be installed through PyPi. :: pip install modin-spreadsheet -Features ----------- -**Column-specific options**: -The feature enables the ability to set 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:: - - col_opts = { 'editable': False } - col_defs = { 'A': { 'editable': True } } - modin_spreadsheet.show_grid(df, column_options=col_opts, column_definitions=col_defs) - -See the `show_grid `_ documentation for more information. - -**Disable editing on a per-row basis**: -This feature allows a user to specify 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:: - - def can_edit_row(row): - return row['status'] == 'active' - - modin_spreadsheet.show_grid(df, row_edit_callback=can_edit_row) - -**Dynamically update an existing spreadsheet widget**: -These API allow users to programmatically update the state of an existing spreadsheet widget: - - - `edit_cell `_ - - `change_selection `_ - - `toggle_editable `_ - - `change_grid_option `_ (experimental) - -**MultiIndex Support**: -Modin-spreadsheet 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 Modin-spreadsheet displaying a -multi-indexed DataFrame: - -.. figure:: https://s3.amazonaws.com/quantopian-forums/pipeline_with_qgrid.png - :align: left - :target: https://s3.amazonaws.com/quantopian-forums/pipeline_with_qgrid.png - :width: 100px - - Running from source & testing your changes ------------------------------------------ @@ -136,8 +95,47 @@ Running automated tests There is a small python test suite which can be run locally by running the command ``pytest`` in the root folder of the repository. -Events API +Features ---------- +**Column-specific options**: +The feature enables the ability to set 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:: + + col_opts = { 'editable': False } + col_defs = { 'A': { 'editable': True } } + modin_spreadsheet.show_grid(df, column_options=col_opts, column_definitions=col_defs) + +See the `show_grid `_ documentation for more information. + +**Disable editing on a per-row basis**: +This feature allows a user to specify 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:: + + def can_edit_row(row): + return row['status'] == 'active' + + modin_spreadsheet.show_grid(df, row_edit_callback=can_edit_row) + +**Dynamically update an existing spreadsheet widget**: +These API allow users to programmatically update the state of an existing spreadsheet widget: + + - `edit_cell `_ + - `change_selection `_ + - `toggle_editable `_ + - `change_grid_option `_ (experimental) + +**MultiIndex Support**: +Modin-spreadsheet 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 Modin-spreadsheet displaying a +multi-indexed DataFrame: + +.. figure:: https://s3.amazonaws.com/quantopian-forums/pipeline_with_qgrid.png + :align: left + :target: https://s3.amazonaws.com/quantopian-forums/pipeline_with_qgrid.png + :width: 100px + +**Events API**: The Events API provides ``on`` and ``off`` methods which can be used to attach/detach event handlers. They're available on both the ``modin_spreadsheet`` module (see `qgrid.on `_), and on individual SpreadsheetWidget instances (see `qgrid.QgridWidget.on `_).