Giter VIP home page Giter VIP logo

itables's Introduction

ITables logo

CI codecov.io Pypi Conda Version pyversions Code style: black Streamlit App

This packages changes how Pandas and Polars DataFrames are rendered in Jupyter Notebooks. With itables you can display your tables as interactive DataTables that you can sort, paginate, scroll or filter.

ITables is just about how tables are displayed. You can turn it on and off in just two lines, with no other impact on your data workflow.

The itables package only depends on numpy, pandas and IPython which you must already have if you work with Pandas in Jupyter (add polars, pyarrow if you work with Polars DataFrames).

Documentation

Browse the documentation to see examples of Pandas or Polars DataFrames rendered as interactive DataTables.

Quick start

Install the itables package with either

pip install itables

or

conda install itables -c conda-forge

Activate the interactive mode for all series and dataframes with

from itables import init_notebook_mode

init_notebook_mode(all_interactive=True)

and then render any DataFrame as an interactive table that you can sort, search and explore: df

If you prefer to render only selected DataFrames as interactive tables, use itables.show to show just one Series or DataFrame as an interactive table: show

Since itables==1.0.0, the jQuery and DataTables libraries and CSS are injected in the notebook when you execute init_notebook_mode with its default argument connected=False. Thanks to this the interactive tables will work even without a connection to the internet.

If you prefer to load the libraries dynamically (and keep the notebook lighter), use connected=True when you execute init_notebook_mode.

Supported environments

ITables works in all the usual Jupyter Notebook environments, including Jupyter Notebook, Jupyter Lab, Jupyter nbconvert (i.e. the tables are still interactive in the HTML export of a notebook), Jupyter Book, Google Colab and Kaggle.

You can also use ITables in Quarto HTML documents, and in RISE presentations.

ITables works well in VS Code, both in Jupyter Notebooks and in interactive Python sessions.

Last but not least, ITables is also available in Streamlit or Shiny applications.

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.