datalint
v0.2.0Audit CSV, Excel, Parquet and SQLite data: missing values, duplicates, outliers, PII.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
load_dataset
Load a file so the other tools can audit it. A SQLite database loads every table and an Excel workbook every sheet, each as its own dataset named after the table or sheet. A database also brings the foreign keys it declares. Only truly empty cells count as missing. Placeholder text such as "N/A" or "null" is kept as written, so check_missing can report it. Excel and Parquet keep real dates and numbers. Loading under an existing name replaces it. Databases are opened read-only. Files outside the folders the user allowed are refused.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a .csv, .tsv, Excel (.xlsx, .xlsm), Parquet (.parquet, .pq) or SQLite (.db, .sqlite, .sqlite3) file, absolute or relative to the first allowed folder. |
name | Name to use in the other tools. Defaults to the file name, or the table or sheet name. Only allowed when loading a single table or sheet. | |
table | SQLite and Excel only: load just this table or sheet. Omit to load all of them. |
list_datasets
List the datasets loaded in this session, with their size.
profile_dataset
Overview of a dataset: size, missing cells, duplicate rows, and one summary per column. Each column gets a type judged from its values: numeric, numeric_as_text (mostly numbers with some text mixed in, usually a data-entry problem), datetime, categorical, text, unique_text, identifier, boolean, constant or empty. disguised_missing counts placeholder text such as "N/A", "-" or blank spaces.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
limit | integer | Columns per page. |
offset | integer | Index of the first item to return, for paging. |
describe_column
A close look at one column. Numbers get min, quartiles, max, mean, zeros and negatives. Text gets lengths, values with stray spaces, and values that only differ by case or spacing. Dates get the earliest and latest. For numeric_as_text columns, lists the values that are not numbers. Common values are listed unless every value is unique.
| Parameter | Type | Description |
|---|---|---|
column * | string | Exact column name, as profile_dataset lists it. |
dataset * | string | A dataset name returned by load_dataset. |
top | integer | How many common values to list. |
check_missing
Where values are missing, worst column first. Counts both empty cells and disguised ones (placeholder text such as "N/A", "null", "-" or blank spaces), and says which placeholders each column uses. Also counts rows with any missing value, fully empty rows, and columns with no values at all.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
limit | integer | Columns per page. |
offset | integer | Index of the first item to return, for paging. |
find_duplicates
Find duplicate rows, either whole rows or on chosen key columns. Returns how many extra copies exist, the largest groups as row numbers, and how many more rows match once case and spacing are ignored. Values are never shown.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
columns | Compare only these columns, such as a key like ['email']. Omit to compare whole rows. | |
limit | integer | Duplicate groups to list. |
find_outliers
Find numbers far outside a column's usual range. Without column: every numeric column with its outlier count and usual range, most outliers first. With column: also its most extreme rows as row numbers with values (values hidden if the column looks like personal data).
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
column | One numeric column to examine closely. Omit to summarise every numeric column. | |
limit | integer | Columns per page, or with column, how many of the most extreme rows to list. |
method | string | iqr (default): beyond 1.5 interquartile ranges from the middle half, robust to skew. zscore: more than 3 standard deviations from the mean, for bell-shaped data. |
offset | integer | Index of the first item to return, for paging. |
check_keys
Check whether a column (or set of columns) works as a unique key: no missing values and no repeats. Reports how many rows break it, with example row numbers.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
columns | Check whether these columns together uniquely identify every row, such as ['id'] or ['order_id', 'line']. Omit to list candidate keys and check every id-like column. |
check_references
Find orphans: values that point at rows missing from the referenced dataset, such as orders whose customer does not exist. Without column and references, checks every foreign key the database declares, plus links guessed from column names across loaded datasets (orders.customer_id -> customers.id).
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
column | Column in this dataset that points at another dataset, such as 'customer_id'. | |
limit | integer | Orphan row numbers to list. |
references | What it points at, as 'dataset.column', such as 'customers.id'. Pass with column. |
detect_pii
Find columns that look like personal data: emails, phone numbers, card numbers, IBANs, IP addresses, US social security numbers, and names, addresses, birth dates or ID numbers suggested by the column name. Reports which kinds, how many values match, and whether the evidence is the values or only the column name. Never returns the values themselves.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | A dataset name returned by load_dataset. |
columns | Columns to scan. Omit to scan every column. | |
limit | integer | Columns per page. |
offset | integer | Index of the first item to return, for paging. |