GET TO KNOW YOUR DATA

Your first Baseline report.

One small script. A transparent set of checks.
A clearer view of the file you’re about to analyze.

What you need: Python 3.9 or newer and a small UTF-8 CSV file. No extra Python packages, account, or API key. The included dataset is ready to try.

01 / Download and run

The starter includes the readable Python source, synthetic example data, an expected report, and tests. Download and extract the ZIP, then open a terminal in the extracted baseline-starter folder.

Download the starter ↓v0.1.0 · 10.1 KiB · MIT license

Inspect baseline.py, then run the example on macOS or Linux:

python3 baseline.py examples/observations.csv --output report.json

Open report.json in a text editor. For the bundled sample, expect 240 rows, 6 columns, 7 missing cells, and 2 extra duplicate rows. You can compare the output with examples/expected-report.json.

On Windows

Extract the ZIP with File Explorer. Open PowerShell in the baseline-starter folder and use your Python 3 launcher:

py -3 baseline.py examples/observations.csv --output report.json

If your installation uses python instead, check python --version and use that command when it reports Python 3.9 or newer.

02 / Inspect your own CSV

Replace the example path with your input file. Quote paths that contain spaces. The CSV must be UTF-8, comma-separated, and have a nonempty, unique header for every column.

python3 baseline.py "path/to/data.csv" --output report.json

The script reads your input without changing it. It writes the report to the chosen output path; an existing report at that path is overwritten. You cannot use the input file itself as the output.

Omit --output to print JSON to standard output. Exit code 0 means the report was generated, not that your data passed a quality threshold. Errors return exit code 1.

03 / Read the output

The report is plain JSON. A summary describes the dataset, while the columns array contains column-level checks. View the complete example report ↗

FieldWhat it tells you
versionExact version of the Baseline script.
input.filenameInput filename, without the parent directory.
input.sha256Fingerprint of the original file bytes.
input.size_bytesSize of the original input file.
summary.row_countData records, excluding the header.
summary.column_countNumber of header fields.
summary.cell_countRows multiplied by columns.
summary.missing_cellsEmpty or whitespace-only cells.
summary.missing_percentMissing cells as a percentage of all cells.
summary.duplicate_rowsExtra occurrences of identical full rows.
columns[].missing_countMissing cells in a column.
columns[].missing_percentMissing cells as a percentage of rows.
columns[].numericNumeric statistics, or null.

A method you can inspect.

Baseline performs descriptive checks using Python’s standard library. The implementation is included in the download so that every definition can be reviewed alongside the result.

Missing values

A cell is missing when its parsed string is empty or contains only whitespace. Strings such as NA, null, and -999 are not automatically missing. Decide how those values should be interpreted in your own workflow.

Percentages are rounded to six decimal places. A header-only file has zero rows and reports missing percentages as 0.0 by convention; that does not establish completeness.

Duplicate rows

Duplicates are exact matches across every parsed field. The first occurrence is retained in the count of unique rows; each further occurrence adds one to duplicate_rows. Case, spaces, and number formatting matter: 1 and 1.0 are different strings. No rows are removed.

Numeric summaries

A column is numeric only if every nonempty value parses as a Python floating-point number. The report records finite_count, nonfinite_count, min, max, mean, and median. Empty or nonnumeric columns have numeric: null.

NaN, infinity, and numeric overflow are counted as nonfinite and excluded from summary statistics. With no finite values, minimum, maximum, mean, and median are null. Floating-point rounding applies.

File provenance

The SHA-256 fingerprint covers the exact input bytes, including line endings. Keep the input, script version, and report together to make later checks easier to reproduce. A matching hash identifies the same bytes; it does not authenticate the author or verify accuracy.

CSV parsing

The script uses Python’s CSV parser in strict mode. Header names are trimmed and must be unique and nonempty. Each data row must contain the same number of fields as the header. Invalid encoding, malformed quoting, or inconsistent field counts produce an error instead of a partial report.

Scope & limitations

Baseline is a first inspection step for small local CSV files. It reads the entire file into memory and is not designed for streaming pipelines or very large datasets.

  • It does not clean data, infer a schema, detect anomalies, or apply domain-specific quality thresholds.
  • Numeric summaries do not establish valid units, plausible ranges, independence, significance, or scientific validity.
  • The example data and website plots are synthetic illustrations, not experimental results.
  • No external certification, independent audit, or institutional endorsement is claimed.
  • The script makes no network requests. Reports contain filenames and summary statistics, so consider their contents before sharing them.

The next decision is yours. A missing cell or duplicate may be expected. Read the findings in the context of how your data was collected.

Verify the starter

Read the source and run the included checks from the extracted folder:

python3 -m unittest discover -s tests -v

The 11 tests cover missing values, duplicates, fingerprints, malformed input, empty datasets, nonfinite values, input protection, and the bundled example. Automated tests provide evidence about those cases, not a guarantee for every dataset.

The ZIP’s SHA-256 checksum is recorded below. Compare it with the downloaded file when you want to check that its bytes match this release.

BASELINE-STARTER-v0.1.0.ZIP / SHA-25679a4f909f4c2b6243c0ab6ffd083040f5339370dd831ca861ecc93fff1d8eeea

View machine-readable release metadata ↗

Troubleshooting

My terminal cannot find Python.

Check whether your Python installation uses python3, python, or py -3. Use its version command first. Baseline requires Python 3.9 or newer and does not include a Python installer.

The script or example file cannot be found.

Make sure the ZIP has been extracted and your terminal is inside baseline-starter. Keep the examples folder beside baseline.py. Quote any custom path that contains spaces.

I get an encoding, header, or field-count error.

Export the input as UTF-8, comma-separated CSV. Check for blank or repeated column names and rows with a different number of fields. Baseline does not automatically repair malformed CSV.

A column has no numeric summary.

Every nonempty value must parse as a number. Values such as NA, currency symbols, or text labels make the column nonnumeric. An entirely empty column also has numeric: null.

The report shows issues, but the command succeeded.

Success means that the report was created. Baseline does not assign pass/fail quality scores. Review missing cells and duplicate rows using your domain knowledge.

License & release

Version 0.1.0 is distributed under the MIT license. You can inspect, use, and adapt the source under those terms. The software is provided as-is.

The source is included in the ZIP. A public GitHub repository has not been linked for this release.