Jupyter DataTables
Jupyter Notebook extension to levarage pandas DataFrames by integrating DataTables JS.
About
Data scientists and in fact many developers work with pd.DataFrame on daily basis to interpret data to process them. In my typical workflow. The common workflow is to display the dataframe, take a look at the data schema and then produce multiple plots to check the distribution of the data to have a clearer picture, perhaps search some data in the table, etc...
What if those distribution plots were part of the standard DataFrame and we had the ability to quickly search through the table with minimal effort? What if it was the default representation?
The jupyter-datatables uses jupyter-require to draw the table.
Installation
pip install jupyter-datatables
Usage
import numpy as np
import pandas as pd
from jupyter_datatables import init_datatables_mode
init_datatables_mode()
That's it, your default pandas representation will now use Jupyter DataTables!
df = pd.DataFrame(np.abs(np.random.randn(50, 5)), columns=list(string.ascii_uppercase[:5]))
In most cases, you don't need to worry too much about the size of your data. Jupyter DataTables calculates required sample size based on a confidence interval (by default this would be 0.95) and margin of error and ceils it to the highest 'smart' value.
For example, for a data containing 100,000 samples, given 0.975 confidence interval and 0.02 margin of error, the Jupyter DataTables would calculate that 3044 samples are required and it would round it up to 4000.
With additional note:
Sample size: 4,000 out of 100,000
We can also handle wide tables with ease.
df = pd.DataFrame(np.abs(np.random.randn(50, 20)), columns=list(string.ascii_uppercase[:20]))
As per 0.3.0, there is a support for interactive tooltips:
And also support for custom indices including Date type:
dft = pd.DataFrame({'A': np.random.rand(5),
'B': [1, 1, 3, 2, 1],
'C': 'This is a very long sentence that should automatically be trimmed',
'D': [pd.Timestamp('20010101'), pd.Timestamp('20010102'), pd.Timestamp('20010103'), pd.Timestamp('20010104'), pd.Timestamp('20010105')],
'E': pd.Series([1.0] * 5).astype('float32'),
'F': [False, True, False, False, True],
})
dft.D = dft.D.apply(pd.to_datetime)
dft.set_index('D', inplace=True)
Current status and future plans:
Check out the Project Board where we track issues and TODOs for our Jupyter tooling!
Author: Marek Cermak macermak@redhat.com, @AICoE
Metadata
Release files for jupyter-datatables 0.3.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyter-datatables-0.3.9.tar.gz | 6.3 MB | Without provenance | Details for jupyter-datatables-0.3.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_datatables-0.3.9-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for jupyter_datatables-0.3.9-py2.py3-none-any.whl |
Total release size: 6.3 MB
Release files / jupyter-datatables-0.3.9.tar.gz
| Download URL | jupyter-datatables-0.3.9.tar.gz |
|---|---|
| Size | 6.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d6d3651447f95e2f3c5ecbe70f929710d90a9cf9aac732938f20a1cdc1a5aba
|
|
BLAKE2b-256 checksum How to use checksums |
def1a6a0645f96d215946915513d3a592b1d3c34bd0607a0727a95c7d170859a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Release files / jupyter_datatables-0.3.9-py2.py3-none-any.whl
| Download URL | jupyter_datatables-0.3.9-py2.py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
913722a440c55ac6764d97e24a910dc746ba71eb8fe64cf76b1a3ee9f0ba0e7e
|
|
BLAKE2b-256 checksum How to use checksums |
74856bc94c915955e72a36f0a736d376a31d25de02ccddd90519f5fd02a2fe14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Security for jupyter-datatables 0.3.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.