Read CSV files and report title, headers, and per-column row counts.
Project description
csv-inspector
csv-inspector is a Python package that reads a CSV file and gives a structured report covering:
- Table title — derived from the file name
- Column headers — every column found in row 1
- Row counts per column — total rows, non-empty rows, empty rows, and fill-rate %
Installation
pip install csv-inspector-tool
Requires Python 3.8 or higher. No third-party dependencies — standard library only.
Quick start
Command line
csv-inspector students.csv
Output:
============================================================
Table : students
File : /home/user/data/students.csv
Rows : 120
Columns: 4
Headers & row counts:
'student_id' total=120 non-empty=120 empty=0 fill=100.0%
'name' total=120 non-empty=118 empty=2 fill=98.33%
'grade' total=120 non-empty=120 empty=0 fill=100.0%
'email' total=120 non-empty=95 empty=25 fill=79.17%
============================================================
Python API
from csv_inspector import inspect
report = inspect("students.csv")
print(report.title) # "students"
print(report.headers) # ['student_id', 'name', 'grade', 'email']
print(report.total_rows) # 120
for stat in report.column_stats:
print(f"{stat.name}: {stat.fill_rate}% complete")
# Or print the full formatted report:
print(report)
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 csv_inspector_tool-0.1.1.tar.gz.
File metadata
- Download URL: csv_inspector_tool-0.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e4108622b403dc746149f9bb393af67588a2b414b48d19a0f80721cd0052f8b
|
|
| MD5 |
dca197d8390a79fffef5d74f23ed0bf4
|
|
| BLAKE2b-256 |
c81b9ac229dce29885ec9c3526d96d2d3afbe48417bb5ff56243f85f72e24e34
|
File details
Details for the file csv_inspector_tool-0.1.1-py3-none-any.whl.
File metadata
- Download URL: csv_inspector_tool-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
812bf4a75a8b27293aac2df2c4e0be8ad17926165d8a8863c397a6ececfe56ae
|
|
| MD5 |
71244b103cf50fc14597ad30c97bd0fe
|
|
| BLAKE2b-256 |
0a25a561e218181d6886bd228d8112be1ff2f94d787cd7ec060e8b6289c8a12a
|