MCPcopy
hub / github.com/man-group/dtale

github.com/man-group/dtale @v3.22.0 sqlite

repository ↗ · DeepWiki ↗ · release v3.22.0 ↗
3,880 symbols 14,736 edges 681 files 607 documented · 16%
README


CircleCI PyPI Python Versions PyPI Conda ReadTheDocs codecov Downloads Open in VS Code

What is it?

D-Tale is the combination of a Flask back-end and a React front-end to bring you an easy way to view & analyze Pandas data structures. It integrates seamlessly with ipython notebooks & python/ipython terminals. Currently this tool supports such Pandas objects as DataFrame, Series, MultiIndex, DatetimeIndex & RangeIndex.

Origins

D-Tale was the product of a SAS to Python conversion. What was originally a perl script wrapper on top of SAS's insight function is now a lightweight web client on top of Pandas data structures.

In The News

Tutorials

## Related Resources

Contents

Where To get It

The source code is currently hosted on GitHub at: https://github.com/man-group/dtale

Binary installers for the latest released version are available at the Python package index and on conda using conda-forge.

# conda
conda install dtale -c conda-forge
# if you want to also use "Export to PNG" for charts
conda install -c plotly python-kaleido
# or PyPI
pip install dtale

Getting Started

PyCharm jupyter

Python Terminal

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

Issues With Windows Firewall

If you run into issues with viewing D-Tale in your browser on Windows please try making Python public under "Allowed Apps" in your Firewall configuration. Here is a nice article: How to Allow Apps to Communicate Through the Windows Firewall

Additional functions available programmatically

import dtale
import pandas as pd

df = pd.DataFrame([dict(a=1,b=2,c=3)])

# Assigning a reference to a running D-Tale process.
d = dtale.show(df)

# Accessing data associated with D-Tale process.
tmp = d.data.copy()
tmp['d'] = 4

# Altering data associated with D-Tale process
# FYI: this will clear any front-end settings you have at the time for this process (filter, sorts, formatting)
d.data = tmp

# Get raw dataframe w/ any sorting or edits made through the UI
d.data

# Get raw dataframe similar to '.data' along with any filters applied using the UI
d.view_data

# Shutting down D-Tale process
d.kill()

# Using Python's `webbrowser` package it will try and open your server's default browser to this process.
d.open_browser()

# There is also some helpful metadata about the process.
d._data_id  # The process's data identifier.
d._url  # The url to access the process.

d2 = dtale.get_instance(d._data_id)  # Returns a new reference to the instance running at that data_id.

dtale.instances()  # Prints a list of all ids & urls of running D-Tale sessions.

Duplicate data check

To help guard against users loading the same data to D-Tale multiple times and thus eating up precious memory, we have a loose check for duplicate input data. The check runs the following: * Are row & column count the same as a previously loaded piece of data? * Are the names and order of columns the same as a previously loaded piece of data?

If both these conditions are true then you will be presented with an error and a link to the previously loaded data. Here is an example of how the interaction looks:

As A Script

D-Tale can be run as script by adding subprocess=False to your dtale.show command. Here is an example script:

import dtale
import pandas as pd

if __name__ == '__main__':
      dtale.show(pd.DataFrame([1,2,3,4,5]), subprocess=False)

Jupyter Notebook

Within any jupyter (ipython) notebook executing a cell like this will display a small instance of D-Tale in the output cell. Here are some examples:

dtale.show assignment instance

If you are running ipython<=5.0 then you also have the ability to adjust the size of your output cell for the most recent instance displayed:

One thing of note is that a lot of the modal popups you see in the standard browser version will now open separate browser windows for spacial convienence:

Column Menus Correlations Describe Column Analysis Instances

JupyterHub w/ Jupyter Server Proxy

JupyterHub has an extension that allows to proxy port for user, JupyterHub Server Proxy

To me it seems like this extension might be the best solution to getting D-Tale running within kubernetes. Here's how to use it:

import pandas as pd

import dtale
import dtale.app as dtale_app

dtale_app.JUPYTER_SERVER_PROXY = True

dtale.show(pd.DataFrame([1,2,3]))

Notice the command dtale_app.JUPYTER_SERVER_PROXY = True this will make sure that any D-Tale instance will be served with the jupyter server proxy application root prefix:

`/user/{jupyter username}/proxy/{dtale instance

Extension points exported contracts — how you extend this code

ButtonToggleProps (Interface)
Component properties for ButtonToggle
frontend/static/ButtonToggle.tsx
CopyToClipboardProps (Interface)
Component properties for CopyToClipboard
frontend/static/CopyToClipboard.tsx
CollapsibleProps (Interface)
Component properties of Collapsible
frontend/static/Collapsible.tsx
HighlightConfig (Interface)
Placeholder for any points we want highlighted in the scatter chart
frontend/static/scatterChartUtils.ts
HTMLPropsWithRefCallback (Interface)
Component properties for HTML element with reference
frontend/static/sliderUtils.tsx

Core symbols most depended-on inside this repo

get
called by 1151
dtale/app.py
text
called by 230
dtale/translations/__init__.py
describe
called by 206
dtale/views.py
build_data_inst
called by 170
tests/dtale/__init__.py
get_data
called by 127
dtale/global_state.py
build_data_inst
called by 117
tests/dtale/column_builders/__init__.py
keys
called by 116
dtale/global_state.py
dict_merge
called by 107
dtale/utils.py

Shape

Function 2,653
Method 502
Interface 389
Class 161
Route 121
Enum 54

Languages

TypeScript50%
Python50%

Modules by API surface

dtale/views.py243 symbols
tests/dtale/test_views.py132 symbols
dtale/global_state.py130 symbols
dtale/column_builders.py119 symbols
dtale/dash_application/charts.py81 symbols
dtale/utils.py68 symbols
tests/dtale/dash/test_dash.py64 symbols
frontend/static/popups/create/CreateColumnState.ts56 symbols
frontend/static/redux/selectors.ts55 symbols
dtale/dash_application/layout/layout.py55 symbols
dtale/app.py53 symbols
tests/dtale/test_global_state.py52 symbols

Dependencies from manifests, versioned

@babel/core7.29.0 · 1×
@babel/eslint-parser7.28.6 · 1×
@babel/eslint-plugin7.27.1 · 1×
@babel/helper-remap-async-to-generator7.27.1 · 1×
@babel/preset-env7.29.0 · 1×
@babel/preset-flow7.27.1 · 1×
@babel/preset-react7.28.5 · 1×
@babel/preset-typescript7.28.5 · 1×
@babel/register7.28.6 · 1×
@babel/traverse7.29.0 · 1×
@blueprintjs/datetime6.0.19 · 1×
@eslint/compat2.0.3 · 1×

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add dtale \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact