https://github.com/gnestor/jupyterlab_table
A Jupyter Lab extension for rendering tabular data
https://github.com/gnestor/jupyterlab_table
extension json-table-schema jupyter jupyterlab notebook renderer
Last synced: over 1 year ago
JSON representation
A Jupyter Lab extension for rendering tabular data
- Host: GitHub
- URL: https://github.com/gnestor/jupyterlab_table
- Owner: gnestor
- Created: 2016-12-01T02:52:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-03T16:12:56.000Z (over 8 years ago)
- Last Synced: 2025-03-18T05:43:58.843Z (over 1 year ago)
- Topics: extension, json-table-schema, jupyter, jupyterlab, notebook, renderer
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 35
- Watchers: 2
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jupyterlab_table
A JupyterLab and Jupyter Notebook extension for rendering [JSON Table Schema](http://frictionlessdata.io/guides/json-table-schema/)

## Prerequisites
* JupyterLab ^0.18.0 and/or Notebook >=4.3.0
## Usage
To render JSONTable output in IPython:
```python
from jupyterlab_table import JSONTable
JSONTable(data=[
{
"Date": "2000-03-01",
"Adj Close": 33.68,
"Open": 89.62,
"Low": 88.94,
"Volume": 106889800,
"High": 94.09,
"Close": 90.81
},
{
"Date": "2000-03-02",
"Adj Close": 34.63,
"Open": 91.81,
"Low": 91.12,
"Volume": 106932600,
"High": 95.37,
"Close": 93.37
}
], schema={
"fields": [
{
"type": "any",
"name": "Date"
},
{
"type": "number",
"name": "Open"
},
{
"type": "number",
"name": "High"
},
{
"type": "number",
"name": "Low"
},
{
"type": "number",
"name": "Close"
},
{
"type": "integer",
"name": "Volume"
},
{
"type": "number",
"name": "Adj Close"
}
]
})
```
Using a pandas DataFrame:
```python
from jupyterlab_table import JSONTable
import pandas
import numpy
df = pandas.DataFrame(numpy.random.randn(2, 2))
JSONTable(df)
```
To render a .table.json file as a tree, simply open it:

## Install
```bash
pip install jupyterlab_table
# For JupyterLab
jupyter labextension install --symlink --py --sys-prefix jupyterlab_table
jupyter labextension enable --py --sys-prefix jupyterlab_table
# For Notebook
jupyter nbextension install --symlink --py --sys-prefix jupyterlab_table
jupyter nbextension enable --py --sys-prefix jupyterlab_table
```
## Development
```bash
pip install -e .
# For JupyterLab
jupyter labextension install --symlink --py --sys-prefix jupyterlab_table
jupyter labextension enable --py --sys-prefix jupyterlab_table
# For Notebook
jupyter nbextension install --symlink --py --sys-prefix jupyterlab_table
jupyter nbextension enable --py --sys-prefix jupyterlab_table
```