Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicolaskruchten/jupyter_pivottablejs
Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js
https://github.com/nicolaskruchten/jupyter_pivottablejs
data-analysis data-science interactive jupyter-notebook pivot-chart pivot-tables
Last synced: 29 days ago
JSON representation
Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js
- Host: GitHub
- URL: https://github.com/nicolaskruchten/jupyter_pivottablejs
- Owner: nicolaskruchten
- License: other
- Created: 2015-09-09T13:39:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T12:50:01.000Z (8 months ago)
- Last Synced: 2024-09-30T09:26:22.632Z (about 1 month ago)
- Topics: data-analysis, data-science, interactive, jupyter-notebook, pivot-chart, pivot-tables
- Language: Python
- Homepage: http://nicolas.kruchten.com/content/2015/09/jupyter_pivottablejs/
- Size: 32.2 KB
- Stars: 684
- Watchers: 21
- Forks: 88
- Open Issues: 25
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.md
Awesome Lists containing this project
- awesome-jupyter-resources - GitHub - 29% open · ⏱️ 04.12.2018): (交互式小部件和可视化)
- awesome-python-machine-learning-resources - GitHub - 29% open · ⏱️ 04.12.2018): (数据可视化)
README
``pivottablejs``: the Python module
===================================Drag’n’drop Pivot Tables and Charts for `Jupyter/IPython Notebook`_,
care of `PivotTable.js`_.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/nicolaskruchten/jupyter_pivottablejs/master?filepath=example%2Fjupyter_pivottablejs_example.ipynbInstallation
------------``pip install pivottablejs`` or ``conda install pivottablejs``
**Note** in the past, the ``conda`` command above installed `pivottablejs-airgap`_ instead of this library; apologies for any confusion this change may cause.
Usage
-----.. code:: python
import pandas as pd
df = pd.read_csv("some_input.csv")from pivottablejs import pivot_ui
pivot_ui(df)
Advanced Usage
--------------Include any `JSON-serializable option to PivotTable.js's pivotUI() function`_ as a keyword argument.
.. code:: python
pivot_ui(df, rows=['row_name'], cols=['col_name'])
Independently control the output file path and the URL used to access it from Jupyter, in case the default relative-URL behaviour is incompatible with Jupyter's settings.
.. code:: python
pivot_ui(df, outfile_path="/x/y.html", url="http://localhost/a/b/x.html")
.. _Jupyter/IPython Notebook: http://jupyter.org/
.. _PivotTable.js: https://github.com/nicolaskruchten/pivottable
.. _pivottablejs-airgap: https://github.com/ContinuumIO/pivottablejs-airgap
.. _JSON-serializable option to PivotTable.js's pivotUI() function: https://github.com/nicolaskruchten/pivottable/wiki/Parameters#options-object-for-pivotui