Python wrapper for Data Explorer
Project description
A Pythonic Data Explorer.
Install
For Python 3.8+:
pip install dx>=1.0.3
Usage
The dx library currently enables DEX media type visualization of pandas DataFrames in two ways:
- individual calls to
dx.display() - updating the current IPython display formatter for a session
Importing
import dx
With dx.display()
dx.display() will display a single dataset using the DEX media type. It currently supports:
-
pandas
DataFrameobjectsimport pandas as pd import random df = pd.DataFrame({ 'random_ints': [random.randint(0, 100) for _ in range(500)], 'random_floats': [random.random() for _ in range(500)], }) dx.display(df)
-
tabular data as
dictorlisttypesdx.display([ [1, 5, 10, 20, 500], [1, 2, 3, 4, 5], [0, 0, 0, 0, 1] ])
-
.csvor.jsonfilepaths
With dx.register() and dx.deregister()
dx will update the current IPython display formatters to allow DEX media type visualization of pandas DataFrame objects for an entire notebook / kernel session instead of the default DataFrame display output.
Note: this only affects pandas DataFrames; it does not affect the display of
.csv/.jsonfile data, ordict/listoutputs
-
dx.register()import pandas as pd # enable DEX display outputs from now on dx.register() df = pd.read_csv("examples/sample_data.csv") df
df2 = pd.DataFrame( [ [1, 5, 10, 20, 500], [1, 2, 3, np.nan, 5], [0, 0, 0, np.nan, 1] ], columns=['a', 'b', 'c', 'd', 'e'] ) df2
-
dx.deregister()df2 = pd.DataFrame( [ [1, 5, 10, 20, 500], [1, 2, 3, np.nan, 5], [0, 0, 0, np.nan, 1] ], columns=['a', 'b', 'c', 'd', 'e'] ) df2
dx.deregister() df2
Develop
git clone https://github.com/noteable-io/dx
cd ./dx
pip install -e .
Code of Conduct
We follow the noteable.io code of conduct.
LICENSE
See LICENSE.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dx-1.1.0.tar.gz.
File metadata
- Download URL: dx-1.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.10 Linux/5.10.60.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1562d31f117c993e6b421815d810353fc2e50e2af176e61bcd18aa4d17c8a8cc
|
|
| MD5 |
cba7dcbe9ae29f0ae3aac01cdd4a9e4c
|
|
| BLAKE2b-256 |
39ab5a55c11f0858a7e9955049e9212a140f08b65bb85bbe1148eea10f5f68f4
|
File details
Details for the file dx-1.1.0-py3-none-any.whl.
File metadata
- Download URL: dx-1.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.10 Linux/5.10.60.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2152cc25590e9de61693ce6114c9e6a4d04c039da999847a3fe716b7fd2e61b9
|
|
| MD5 |
e748b44f616bfef9b590031ff39539c1
|
|
| BLAKE2b-256 |
abc78e28ae0aa952d5d1ebcb96b3c00814418b10a5a90936b828deeef32cea65
|