dxray: an X-ray for your data
One line tells you what's wrong with a dataset and what stands out in it, in plain English. Then clean it, share a report, or ask Claude about it.
import dxray as dx
dx.scan(df, target="revenue")
◆ dxray orders.csv 4,040 rows × 13 columns. Health 53/100: 12 issues, 16 insights.
What stands out
→ What drives 'revenue': 'ad_spend', 'price', 'tier'.
→ 'price' differs a lot by 'tier': 'Premium' averages 221, 5.2× 'Basic' (42.4).
→ Total 'revenue' rose 122% from 2026-01 to 2026-12 (by month).
→ Total 'revenue' dropped 61% in 2026-03 (vs 2026-02), the biggest fall of any month.
→ The top 20% of 'customer' values (68 of 338) account for 83% of total 'revenue'.
Data problems
● 'price' holds numbers stored as text (like '$46.25', '$95.54'), so you can't sum or average it.
fix: df['price'] = pd.to_numeric(df['price'].astype(str).str.replace(r'[,$€£₹¥%\s]', '', regex=True), errors='coerce')
● 'region' spells the same value different ways (like 'NORTH', 'North', 'north').
fix: df['region'] = df['region'].str.strip().str.title()
● 40 rows (1.0%) are exact duplicates of another row.
fix: df = df.drop_duplicates()
pip install dxray
Works with pandas DataFrames (and polars or pyarrow tables, dicts, lists) and with CSV, Excel, Parquet and JSON files.
Python 3.9+. Only needs pandas and numpy (dx.ask() needs Python 3.10+, like the Anthropic SDK).
Why dxray
Every analysis starts the same way: twenty minutes of df.info(), df.describe(), value_counts() and squinting,
before you know whether the data can be trusted or where the story is. dxray does that pass for you, in one line, and
writes it in sentences:
- What each column really is. Not just
objectandint64: money stored as text, dates stored as text, yes/no columns, IDs, emails, categories, free text, constants. - What's wrong, and the exact fix. Missing values (including "N/A", "-", "null" hiding as text), duplicates, repeated IDs, the same category spelled three ways, stray spaces, numbers stored as text, impossible outliers, sentinel values like -999. Every problem comes with the pandas line that fixes it.
- What stands out. The strongest relationships, the groups that differ, what drives the column you care about, trends over time and the biggest jumps and drops, 80/20 concentration, and averages that lie. Ranked, so the best come first.
- A health score from 0 to 100, so you can see at a glance whether the data is ready.
A report you can share
report = dx.scan(df, target="revenue")
report # in Jupyter: a rich report with charts
report.to_html("report.html") # one self-contained page: email it, attach it, open it anywhere
report.to_markdown() # for a PR, a wiki, a notebook cell
report.to_json() # for code
Clean it, safely
clean_df, log = dx.clean(df)
print(log)
dxray cleaned 4,040 rows → 4,000 rows, 7 changes
✓ 'order_date': dates stored as text are now dates
✓ 'region': merged different spellings of the same value (111 values)
✓ 'price': 31 values like 'N/A' or '-' are now missing values
✓ 'price': numbers stored as text are now numbers
✓ Dropped 40 duplicate rows
dx.clean() only makes mechanical fixes and tells you every one. It never drops outliers or fills in missing values:
those are decisions about your data, so the report tells you about them and you decide. Your original DataFrame is
left untouched.
Made for AI
Give any AI model your dataset, without pasting a million rows. dx.for_llm(df) describes the data in compact
Markdown: every column with its type and statistics (computed from all rows), a few sample rows, the problems and the
findings. A few thousand tokens instead of your whole table.
prompt = dx.for_llm(df, target="revenue")
Or just ask. With pip install "dxray[ai]" and an
Anthropic API key, dx.ask() sends that description to Claude:
dx.ask(df, "Why did revenue drop in March, and is the data trustworthy enough to report?")
Claude sees dxray's description, not your rows. Asking several questions about the same data reuses the cached
description, so follow-ups are faster and cheaper. Choose effort="low", "medium" (default) or "high", a
model=, or pass your own client=anthropic.Anthropic(...).
From the command line
$ dxray sales.csv --target revenue --html report.html
$ dxray sales.csv --clean sales_clean.csv
$ dxray sales.csv --llm > context.md
$ dxray sales.csv --ask "Which region is growing fastest?"
$ dxray sales.csv --json
Good to know
- Big data: columns are profiled on every row; the relationship and trend analysis uses a 200,000-row random sample, so a million-row table still takes seconds.
- Correlation isn't cause. dxray tells you what moves together and what differs; deciding why is still your job.
- Trends use the table's main date column (it skips birth, signup and join dates), leave out thin periods, and can't be faked by a few typos like a quantity of 9,999.
- Private by default. Everything runs locally. Only
dx.ask()sends anything anywhere: the description, to the Anthropic API.
License
MIT. Made by FlightCoders, the team behind the Veyra editor.
Metadata
Release files for dxray 1.0.0
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 |
|---|---|---|---|---|
| dxray-1.0.0.tar.gz | 32.8 kB | With provenance | Details for dxray-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dxray-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for dxray-1.0.0-py3-none-any.whl |
Total release size: 64.4 kB
Release files / dxray-1.0.0.tar.gz
| Download URL | dxray-1.0.0.tar.gz |
|---|---|
| Size | 32.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a825e90e801f82c2c0bb8a44e15bd74ab0507749cf0f6df4d594597d48adde47
|
|
BLAKE2b-256 checksum How to use checksums |
84b45ba5264de6078d67971e15a2495ff93014d99c3d2f590800e01f949dbfbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / dxray-1.0.0-py3-none-any.whl
| Download URL | dxray-1.0.0-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45b4467453f49b1780e8bad43396f18d02ad6fc595d32fad4897030047e145ac
|
|
BLAKE2b-256 checksum How to use checksums |
3f698e78ee48cc8a28beb68b195efc385faffe7854badf821e02d5aa4036bc46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for dxray 1.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dxray-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA 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.