All notable changes to PyDI will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
LLM-Based Schema Matching Enhancements:
source_metadataparameter inmatch()for Schema.org Dataset metadatatarget_schemaparameter inmatch()to override constructor-level schema- Structured prompt template with clear sections (Dataset Description, Provenance, Sample Data)
- Support for
variableMeasuredfield descriptions from Schema.org metadata
-
JSON Schema Integration:
load_normalization_spec()derives normalization rules from JSON Schemaload_validation_spec()extracts validation constraints from JSON Schema- Support for
type,format, and customx-pydi-*extensions - Target schema descriptions passed to LLM for better matching context
-
SchemaTranslator with Normalization:
normalizeparameter acceptsNormalizationSpec,True(auto-detect), orFalseon_failureparameter controls handling of normalization failures- Combined translation and normalization in a single step
-
New Spec/Transform API for declarative normalization:
NormalizationSpec- Define DataFrame-level normalization rulesColumnSpec- Per-column normalization settings with options for output type, failure handling, units, percentages, country/currency formats, phone formatting, and moretransform_dataframe()- Apply transformations according to a specnormalize_dataframe()- Main entry point with optional auto-detection (auto=True)TransformResult/DataFrameTransformResult- Detailed transformation metadata
-
Enhanced profiling:
DataTypeExtendedenum for richer type classification- Percentage detection (both
50%and0.5formats) - Coordinate detection using
CoordinateParser - Boolean string detection (
"yes","no","true","false") - Improved profile summary output with samples and suggestions
-
New integration modules:
integrations/babel_numbers.py- Locale-aware numeric parsing with Babelintegrations/pydantic_validation.py- DataFrame validation against Pydantic models
-
New validators:
PydanticSchemaValidator- Validate DataFrames using Pydantic modelsvalidate_with_pydantic()- Convenience function for Pydantic validation
-
Documentation:
- Schema Matching Wiki with Target Schema and Source Dataset Metadata sections
- Normalization Wiki with JSON Schema integration guide and type/format mapping tables
- Updated tutorials with proper content ordering and cross-references
- End-to-end use cases for companies, games, movies, and music domains
-
EmailValidator now uses
email-validatorlibrary instead of regex patterns- Constructor parameter changed from
strict: booltocheck_deliverability: bool validate_emails()function signature updated accordingly
- Constructor parameter changed from
-
NumericParser now delegates Babel logic to
integrations/babel_numbers.py -
WebTableNormalizer now delegates to
TextNormalizerandHeaderNormalizerinternally -
AdvancedValueNormalizer now uses
scalemodule andnormalize_quantity()instead of customQuantityModifierhandling -
DateNormalizer uses
pd.to_datetime()without deprecatedinfer_datetime_formatparameter
-
columns.pymodule deleted - functionality consolidated intoprofile.py:AdvancedTypeDetectorColumnTypeInferenceValueDetectionTypedetect_column_types()analyze_column_quality()detect_dataframe_types()infer_column_types()
-
detectors.pymodule deleted:DataTypeNullDetectorOutlierDetectorDuplicateDetector
-
TokenizationNormalizerclass removed fromtext.py- For tokenization with stemming/stopwords, use:
PyDI.utils.SimilarityRegistry.TOKENIZATION_STRATEGIESPyDI.entitymatching.blocking.TokenBlocker
- For tokenization with stemming/stopwords, use:
-
tokenize_text()function removed fromtext.py
# Before
from PyDI.normalization.columns import DataTypeExtended, detect_column_types
# After
from PyDI.normalization import DataTypeExtended
from PyDI.normalization import profile_dataframe # Use profiling insteadfrom PyDI.normalization import (
profile_dataframe,
NormalizationSpec,
transform_dataframe,
normalize_dataframe,
)
# Option 1: Auto-detection
normalized_df = normalize_dataframe(df, auto=True)
# Option 2: From profile
profile = profile_dataframe(df)
spec = NormalizationSpec.from_profile(profile)
result = transform_dataframe(df, spec)
normalized_df = result.dataframe
# Option 3: Manual specification
spec = NormalizationSpec()
spec.set_column("revenue", expand_scale_modifiers=True, output_type="float")
spec.set_column("country", country_format="alpha_2")
spec.set_column("phone", phone_format="e164", phone_default_region="DE")
result = transform_dataframe(df, spec)# Before
validator = EmailValidator(strict=True)
# After
validator = EmailValidator(check_deliverability=False) # or True for DNS checks# Before
from PyDI.normalization.text import TokenizationNormalizer
tokenizer = TokenizationNormalizer(use_stemming=True)
tokens = tokenizer.tokenize(text)
# After - use entity matching tokenizers
from PyDI.entitymatching.blocking import TokenBlocker
# Or access tokenization strategies directly
from PyDI.utils import SimilarityRegistry