Skip to main content

Web Client for Visualizing Pandas Objects

Project description

CircleCI PyPI ReadTheDocs Coverage Status

Getting Started

Setup/Activate your environment and install the egg

# create a vritualenv (if you haven't already created one)
$ python3 -m venv ~/pyenvs/dtale
$ source ~/pyenvs/dtale/bin/activate
# install dtale egg (important to use the "-U" every time you install so it will grab the latest version)
$ pip install --upgrade dtale

Now you will have to ability to use D-Tale from the command-line or within a python-enabled terminal

Command-line

Loading data from arctic

dtale --arctic-host mongodb://localhost:27027 --arctic-library jdoe.my_lib --arctic-node my_node --arctic-start 20130101 --arctic-end 20161231

Loading data from CSV

dtale --csv-path /home/jdoe/my_csv.csv --csv-parse_dates date

Python Terminal

This comes courtesy of PyCharm Python Terminal Feel free to invoke python or ipython directly and use the commands in the screenshot above and it should work

UI

Once you have kicked off your D-Tale session please copy & paste the link on the last line of output in your browser Chrome #1

The information in the upper right-hand corner is similar to saslook Info - lower-left => row count - upper-right => column count - clicking the triangle displays the menu of standard functions (click outside menu to close it) Menu

Selecting/Deselecting Columns - to select a column, simply click on the column header (to deselect, click the column header again) - You’ll notice that the columns you’ve selected will display in the top of your browser Column Select

For Developers

Getting Started

Clone the code (git clone ssh://git@github.com:manahl/dtale.git), then start the backend server:

$ git clone ssh://git@github.com:manahl/dtale.git
# install the dependencies
$ python setup.py develop
# start the server
$ python dtale --csv-path /home/jdoe/my_csv.csv --csv-parse_dates date

You can also run dtale from PyDev directly.

You will also want to import javascript dependencies and build the source:

$ npm install
# 1) a persistent server that serves the latest JS:
$ npm run watch
# 2) or one-off build:
$ npm run build

Running tests

The usual npm test command works:

$ npm test

You can run individual test files:

$ TEST=static/__tests__/dtale/DataViewer-base-test.jsx npm run test-file

Linting

You can lint all the JS and CSS to confirm there’s nothing obviously wrong with it:

$ npm run lint -s

You can also lint individual JS files:

$ npm run lint-js-file -s -- static/dtale/DataViewer.jsx

Formatting JS

You can auto-format code as follows:

$ npm run format

Docker development

You can build python 27-3 & run D-Tale as follows:

$ yarn run build
$ docker-compose build dtale_2_7
$ docker run -it --network host dtale_2_7:latest
$ python
>>> import pandas as pd
>>> df = pd.DataFrame([dict(a=1,b=2,c=3)])
>>> import dtale
>>> dtale.show(df)

Then view your D-Tale instance in your browser using the link that gets printed

You can build python 36-1 & run D-Tale as follows:

$ yarn run build
$ docker-compose build dtale_3_6
$ docker run -it --network host dtale_3_6:latest
$ python
>>> import pandas as pd
>>> df = pd.DataFrame([dict(a=1,b=2,c=3)])
>>> import dtale
>>> dtale.show(df)

Then view your D-Tale instance in your browser using the link that gets printed

Documentation

Have a look at the detailed documentation.

Requirements

D-Tale works with:

  • Back-end
    • Flask
    • Flask-Caching
    • Flask-Compress
    • flasgger
    • Pandas
    • scipy
    • six
  • Front-end
    • react-virtualized
    • chart.js

Acknowledgements

D-Tale has been under active development at Man Numeric since 2019.

Original concept and implementation: Andrew Schonfeld

Contributors:

Contributions welcome!

License

D-Tale is licensed under the GNU LGPL v2.1. A copy of which is included in LICENSE

Changelog

1.0.0 (2019-09-06)

  • Initial public release

Project details


Release history Release notifications

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dtale, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size dtale-1.0.0-py2.7.egg (3.0 MB) File type Egg Python version 2.7 Upload date Hashes View hashes
Filename, size dtale-1.0.0-py2.py3-none-any.whl (3.0 MB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size dtale-1.0.0-py3.6.egg (3.0 MB) File type Egg Python version 3.6 Upload date Hashes View hashes
Filename, size dtale-1.0.0.tar.gz (3.0 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page