@@ -22,12 +22,12 @@ Diffly is a utility package for comparing Polars DataFrames and LazyFrames with
2222## Key Features
2323
2424- ** Primary key-based comparison** : Join DataFrames on specified primary keys for row-by-row comparison
25- - ** Tolerance-based equality** : Configure absolute and relative tolerances for floating point comparisons
26- - ** Temporal tolerance** : Support for comparing temporal types (dates, datetimes) with configurable tolerances
2725- ** Rich summaries** : Generate detailed, visually formatted comparison reports
2826- ** Lazy evaluation** : Uses Polars LazyFrames internally for efficient computation
29- - ** Method caching** : Automatically caches comparison results to avoid recomputation
27+ - ** Tolerance-based equality** : Configure absolute and relative tolerances for floating point comparisons
28+ - ** Temporal tolerance** : Support for comparing temporal types (dates, datetimes) with configurable tolerances
3029- ** Per-column tolerances** : Fine-grained control over comparison tolerances for each column
30+ - ** Method caching** : Automatically caches comparison results to avoid recomputation
3131- ** Testing utilities** : Built-in assertion functions for DataFrame and Collection equality in tests
3232
3333## Quick Example
@@ -40,13 +40,11 @@ from diffly import compare_frames
4040left = pl.DataFrame({
4141 " id" : [" a" , " b" , " c" ],
4242 " value" : [1.0 , 2.0 , 3.0 ],
43- " category" : [" x" , " y" , " z" ]
4443})
4544
4645right = pl.DataFrame({
4746 " id" : [" a" , " b" , " d" ],
48- " value" : [1.0 , 2.1 , 4.0 ],
49- " category" : [" x" , " y" , " w" ]
47+ " value" : [1.0 , 2.5 , 4.0 ],
5048})
5149
5250# Compare the DataFrames
@@ -56,8 +54,8 @@ comparison = compare_frames(left, right, primary_key="id")
5654if not comparison.equal():
5755 # Display a detailed summary
5856 summary = comparison.summary(
59- show_perfect_column_matches = True ,
60- top_k_column_changes = 5
57+ top_k_column_changes = 1 ,
58+ show_sample_primary_key_per_change = True
6159 )
6260 print (summary)
6361```
0 commit comments