Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -223,6 +223,12 @@ if fetch_data:
|
|
223 |
return pd.isna(value) or value in ["", "N/A", "null", None]
|
224 |
|
225 |
if not metadata_df.empty:
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
stats_html = f"""
|
227 |
<div class="sidebar-stats">
|
228 |
<h3 style="color: lightgray;">π Quick Stats</h3>
|
|
|
223 |
return pd.isna(value) or value in ["", "N/A", "null", None]
|
224 |
|
225 |
if not metadata_df.empty:
|
226 |
+
incomplete_mask = metadata_df.map(is_incomplete).any(axis=1)
|
227 |
+
incomplete_count = incomplete_mask.sum()
|
228 |
+
total_fields = metadata_df.size
|
229 |
+
filled_fields = (~metadata_df.map(is_incomplete)).sum().sum()
|
230 |
+
overall_percent = (filled_fields / total_fields) * 100
|
231 |
+
|
232 |
stats_html = f"""
|
233 |
<div class="sidebar-stats">
|
234 |
<h3 style="color: lightgray;">π Quick Stats</h3>
|