Structured data profiling for the analyser family
Project description
records-analyser
Profiles structured data files and returns row counts, column statistics, schema inference, missing value counts, and sample rows.
Part of the analyser family.
Install
pip install records-analyser
Requires Python 3.11+.
Usage
Python
from records_analyser import RecordsAnalyser
result = RecordsAnalyser().analyse("survey.csv")
profile = result["profile"]
print(f"Rows: {profile['rows']}, Columns: {profile['columns']}")
for col, info in profile["column_profiles"].items():
print(f" {col}: {info['type']}, missing={info['missing']}")
CLI
# Human-readable summary
records-analyser analyse data.csv
# SQLite — profiles all tables
records-analyser analyse results.db
# Machine-readable JSON
records-analyser analyse data.xlsx --json
# Start the HTTP server
records-analyser serve --port 8003
HTTP API
curl -X POST http://localhost:8003/analyse \
-F "file=@data.csv"
Supported formats
| Format | Extensions |
|---|---|
| CSV / TSV | .csv .tsv |
| Excel | .xlsx .xls |
| Parquet | .parquet |
| SQLite | .sqlite .db .sqlite3 |
| JSON | .json |
| YAML | .yaml .yml |
| XML | .xml |
JSON and YAML files that look like configuration objects (not arrays of records) include a warning suggesting document-analyser for prose content.
Output
{
"format": "csv",
"file_path": "/path/to/survey.csv",
"file_size": 4096,
"profile": {
"rows": 150,
"columns": 4,
"column_profiles": {
"age": {
"type": "numeric",
"min": 18.0, "max": 72.0, "mean": 34.2,
"median": 32.0, "std": 11.4,
"q25": 25.0, "q75": 42.0,
"missing": 2, "missing_pct": 1.3
},
"country": {
"type": "categorical",
"unique": 12,
"top_values": {"Australia": 45, "USA": 38},
"missing": 0, "missing_pct": 0.0
}
},
"sample": [{"age": 28, "country": "Australia"}]
}
}
SQLite results include a tables key with one profile per table.
The analyser family
Low-level analysis tools. Each accepts files directly and returns structured JSON. Build your own UI or pipeline on top.
| Package | Handles |
|---|---|
| speech-analyser | audio and video files — transcript and speech metrics |
| video-analyser | video files — frames, scenes, and visual quality |
| document-analyser | PDF, DOCX, PPTX, TXT — text and readability |
| code-analyser | source code — style, complexity, and quality metrics |
| records-analyser | CSV, Excel, SQLite, Parquet, JSON — data profiling |
| auto-analyser | any file — detects format and routes to the right tool |
Licence
MIT
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 records_analyser-0.2.1.tar.gz.
File metadata
- Download URL: records_analyser-0.2.1.tar.gz
- Upload date:
- Size: 90.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b827995effbe1a8440e4e73fe9d07cee9919e057bdc996e5392cc5db1b803108
|
|
| MD5 |
23f414233ac480ac55f1b904c5667d60
|
|
| BLAKE2b-256 |
875949e5a4b7e46d00ff1e0ff07a7c31695c063fd4f1f624a276fbb3ecf571c4
|
File details
Details for the file records_analyser-0.2.1-py3-none-any.whl.
File metadata
- Download URL: records_analyser-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1e9dadeeaa892c35afc18a01bc27333af8ccc23f9d1dce882ed777de31ff7ff
|
|
| MD5 |
33aa76dad692f77e0a94cb40c74d4166
|
|
| BLAKE2b-256 |
3f0570277a710ecfc00688c3c8cb642a1ae2c6aab81deaf6580a872806a419a4
|