Python data quality libraries

Updated Nov 2026

Python data quality libraries check that datasets match the rules a team expects, such as types, ranges, null counts, and uniqueness. A check runs against a DataFrame, a SQL table, or a Spark dataset and returns a structured result for each rule. These libraries let data pipelines stop bad records before they reach reports or machine learning models.

Popularity

GX Core has the most monthly downloads in this comparison, at 19.5M.

LibraryMonthly downloadsStarsLast releaseLicense
GX Core
19.5M
11.9KNov 2026Apache-2.0
PyDeequ
13.3M
828Sep 2026Apache-2.0
Pandera
10.2M
4.5KNov 2026MIT
DQX
6.2M
487Nov 2026Databricks License
Soda Core
1.9M
2.5KNov 2026Proprietary
DataComPy
1.8M
671Oct 2026Apache-2.0
Data Contract CLI
1.1M
1.1KNov 2026MIT
Frictionless
988.8K
858Oct 2026MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Defines data expectations, validates datasets, and builds readable validation documentation.

Downloads / mo
19.5M
Stars
11.9K
Last release
1.25.0
License
Apache-2.0

Strengths

  • Organizes reusable data expectations. Define expectations as unit tests for data.
  • Builds readable validation sites. Generate HTML pages for expectation suites and validation results.

Limitations

  • Defaults to summary results. Set result_format for the failure details the pipeline needs.

Quickstart

From try_gx_exploratory.py
$ pip install great_expectations pandas
import great_expectations as gx
import pandas as pd

context = gx.get_context()
frame = pd.DataFrame({'value': [1, 2]})
source = context.data_sources.add_pandas('pandas')
asset = source.add_dataframe_asset(name='frame')
batch_definition = asset.add_batch_definition_whole_dataframe('whole')
batch = batch_definition.get_batch(batch_parameters={'dataframe': frame})
result = batch.validate(gx.expectations.ExpectColumnValuesToBeBetween(column='value', min_value=1))
print(result)

GX Core examples

From open-source projects on GitHub

Runs Deequ data-quality metrics, constraints, and suggestions through Apache Spark.

Downloads / mo
13.3M
Stars
828
Last release
1.7.0
License
Apache-2.0

Strengths

  • Profiles data and verifies constraints. Combine metrics, constraint checks, and suggested rules in Spark.
  • Tracks metrics across runs. Persist metrics in a repository for comparisons over time.

Limitations

  • Needs a matching Spark runtime. Set SPARK_VERSION before importing PyDeequ and load its matching JAR.

Quickstart

From README.md
$ pip install pydeequ
from pyspark.sql import SparkSession
from pydeequ.analyzers import AnalysisRunner, Size

spark = SparkSession.builder.getOrCreate()
frame = spark.createDataFrame([(1,), (2,)], ['value'])
result = AnalysisRunner(spark).onData(frame).addAnalyzer(Size()).run()
print(result)

PyDeequ examples

From open-source projects on GitHub

Validates dataframe-like objects against schemas, column properties, and custom checks.

Downloads / mo
10.2M
Stars
4.5K
Last release
0.36.0
License
MIT

Strengths

  • Validates dataframe columns and rules. Check the types and properties of dataframe columns.
  • Supports different dataframe backends. Choose the backend extra for the dataframe library in use.

Limitations

  • Stops after the first error. Set lazy to collect failures across schema checks.

Quickstart

From stable.md
$ pip install 'pandera[pandas]'
import pandas as pd
import pandera.pandas as pa

schema = pa.DataFrameSchema({'value': pa.Column(int, pa.Check.ge(0))})
validated = schema.validate(pd.DataFrame({'value': [1, 2]}))
print(validated)

Pandera examples

From open-source projects on GitHub

Runs data quality checks and data quality monitoring.

Downloads / mo
6.2M
Stars
487
Last release
0.17.2
License
Databricks License

Quickstart

From engine.py
$ pip install databricks-labs-dqx
from databricks.sdk import WorkspaceClient
from databricks.labs.dqx.engine import DQEngineCore

engine = DQEngineCore(workspace_client=WorkspaceClient())
checks = engine.load_checks_from_local_file('checks.yml')
result = engine.apply_checks_by_metadata(df, checks)

Verifies schema and data-quality contracts expressed in YAML.

Downloads / mo
1.9M
Stars
2.5K
Last release
4.30.0
License
Proprietary

Strengths

  • Defines checks as data contracts. Store schema and data rules in YAML contracts.
  • Returns individual check outcomes. Inspect each contract’s check results and overall execution status.

Limitations

  • is_passed excludes execution errors. Use is_ok to reject failed checks and execution errors.

Quickstart

From __init__.py
$ pip install soda-postgres
from soda_core.contracts import verify_contract_locally

result = verify_contract_locally(
    data_source_file_path='data_source.yml',
    contract_file_path='contract.yml',
)
print(result)

Compares DataFrames in Python.

Downloads / mo
1.8M
Stars
671
Last release
1.2.0
License
Apache-2.0

Quickstart

From README.md
$ pip install datacompy
import pandas as pd
from datacompy import PandasCompare

left = pd.DataFrame({'id': [1], 'value': [2]})
right = pd.DataFrame({'id': [1], 'value': [2]})
comparison = PandasCompare(left, right, join_columns='id')
print(comparison.matches())

Data Contract CLI

Lints data contract YAML files, connects to data sources, and runs schema and quality tests from the command line.

Downloads / mo
1.1M
Stars
1.1K
Last release
1.2.11
License
MIT

Quickstart

From python-library.md
$ pip install datacontract-cli
from datacontract.data_contract import DataContract

contract = DataContract(data_contract_file='datacontract.yaml')
run = contract.lint()
print(run.result)

Frictionless

Describes, extracts, validates, and transforms tabular data.

Downloads / mo
988.8K
Stars
858
Last release
5.21.0
License
MIT

Quickstart

From validating-data.md
$ pip install frictionless
from pprint import pprint
from frictionless import validate

report = validate('capital-invalid.csv')
print(report)

FAQ

GX Core suits teams that define expectations for DataFrames or SQL data and want readable validation documentation. Pandera suits schema checks on DataFrames inside Python code. PyDeequ and DQX suit checks on Spark datasets.

Great Expectations, published as GX Core, defines expectations about data and validates DataFrame batches or SQL data against them. Each run returns structured results and can build readable validation documentation.

Pandera validates DataFrame-like objects against schemas, column properties, and custom checks. It covers both schema and statistical validation.

DataComPy compares two datasets and reports the differences in rows and columns.

Soda Core verifies schema and data quality contracts written in YAML against a data source.

For coding agents

Found your data quality library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official