This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ def flake_aggregates_with_percentage(
4242 merged_results : pl .DataFrame = pl .concat ([past_aggregates , curr_aggregates ])
4343
4444 merged_results = merged_results .with_columns (
45- pl .all ().pct_change ().fill_nan (0 ).name .suffix ("_percent_change" )
45+ pl .all ()
46+ .pct_change ()
47+ .replace ([float ("inf" ), float ("-inf" )], None )
48+ .fill_nan (0 )
49+ .name .suffix ("_percent_change" )
4650 )
4751 aggregates = merged_results .row (1 , named = True )
4852
Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ def test_results_aggregates_with_percentage(
7171 # with_columns upserts the new columns, so if the name already exists it get overwritten
7272 # otherwise it's just added
7373 merged_results = merged_results .with_columns (
74- pl .all ().pct_change ().fill_nan (0 ).name .suffix ("_percent_change" )
74+ pl .all ()
75+ .pct_change ()
76+ .replace ([float ("inf" ), float ("-inf" )], None )
77+ .fill_nan (0 )
78+ .name .suffix ("_percent_change" )
7579 )
7680 aggregates = merged_results .row (1 , named = True )
7781
You can’t perform that action at this time.
0 commit comments