DavMelchi commited on
Commit
663d399
·
1 Parent(s): 2db40f5

fix warning

Browse files
process_kpi/kpi_health_check/engine_v2.py CHANGED
@@ -289,7 +289,12 @@ def evaluate_health_check(
289
  if not out_frames:
290
  return pd.DataFrame(), pd.DataFrame()
291
 
292
- status_df = pd.concat(out_frames, ignore_index=True)
 
 
 
 
 
293
 
294
  summary = (
295
  status_df.groupby("site_code", as_index=False)
 
289
  if not out_frames:
290
  return pd.DataFrame(), pd.DataFrame()
291
 
292
+ # Filter out empty frames to avoid FutureWarning about empty/all-NA entries
293
+ non_empty_frames = [f for f in out_frames if not f.empty and not f.isna().all().all()]
294
+ if not non_empty_frames:
295
+ return pd.DataFrame(), pd.DataFrame()
296
+
297
+ status_df = pd.concat(non_empty_frames, ignore_index=True)
298
 
299
  summary = (
300
  status_df.groupby("site_code", as_index=False)