Code Monkey home page Code Monkey logo

jupyterlab_table's Introduction

jupyterlab_table

A JupyterLab and Jupyter Notebook extension for rendering JSON Table Schema

output renderer

Prerequisites

  • JupyterLab ^0.18.0 and/or Notebook >=4.3.0

Usage

To render JSONTable output in IPython:

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:

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:

file renderer

Install

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

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

jupyterlab_table's People

Contributors

gnestor avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.