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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jupyterlab_table's Issues

Can't enable jupyterlab table: Unrecognized flag: '--symlink

I couldn't install using:
pip install jupyterlab_table
but got this to work:
pip install git+https://github.com/gnestor/jupyterlab_table

Now i'm trying to enable the extension but getting an error that I can't symlink:

(python3) jespinozlt-osx:~ jespinoz$ jupyter labextension install --symlink --py --sys-prefix jupyterlab_table
Install labextension(s)

Options
-------

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--debug
    set log level to logging.DEBUG (maximize logging output)
--generate-config
    generate default config file
-y
    Answer yes to any questions instead of prompting.
--no-build
    Defer building the app after the action.
--dev-build
    Build in Development mode
--clean
    Cleanup intermediate files after the action.
--log-level=<Enum> (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.
--config=<Unicode> (JupyterApp.config_file)
    Default: ''
    Full path of a config file.
--app-dir=<Unicode> (BaseExtensionApp.app_dir)
    Default: ''
    The app directory to target

To see all available configurables, use `--help-all`

Bad config encountered during initialization:
Unrecognized flag: '--symlink'

and this:

(python3) jespinozlt-osx:~ jespinoz$ jupyter labextension enable --py --sys-prefix jupyterlab_table
Enable labextension(s) by name

Options
-------

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--debug
    set log level to logging.DEBUG (maximize logging output)
--generate-config
    generate default config file
-y
    Answer yes to any questions instead of prompting.
--no-build
    Defer building the app after the action.
--dev-build
    Build in Development mode
--clean
    Cleanup intermediate files after the action.
--log-level=<Enum> (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.
--config=<Unicode> (JupyterApp.config_file)
    Default: ''
    Full path of a config file.
--app-dir=<Unicode> (BaseExtensionApp.app_dir)
    Default: ''
    The app directory to target

To see all available configurables, use `--help-all`

Bad config encountered during initialization:
Unrecognized flag: '--py'

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.