Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -245,7 +245,6 @@ if fetch_data:
|
|
245 |
"Value": [len(metadata_df), incomplete_count, round(overall_percent, 1)]
|
246 |
})
|
247 |
|
248 |
-
# Style it without index
|
249 |
styled_quick_stats = (
|
250 |
quick_stats.style
|
251 |
.hide(axis="index")
|
@@ -260,6 +259,25 @@ if fetch_data:
|
|
260 |
use_container_width=True,
|
261 |
hide_index=True
|
262 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
# Calculate Top 10 Subjects
|
264 |
if 'subject' in metadata_df.columns:
|
265 |
top_subjects = (
|
|
|
245 |
"Value": [len(metadata_df), incomplete_count, round(overall_percent, 1)]
|
246 |
})
|
247 |
|
|
|
248 |
styled_quick_stats = (
|
249 |
quick_stats.style
|
250 |
.hide(axis="index")
|
|
|
259 |
use_container_width=True,
|
260 |
hide_index=True
|
261 |
)
|
262 |
+
|
263 |
+
# Sidebar: Metadata Missing Stats
|
264 |
+
missing_df = pd.DataFrame(list(missing_counts.items()), columns=["Field", "Missing Count"])
|
265 |
+
|
266 |
+
styled_missing_df = (
|
267 |
+
missing_df.style
|
268 |
+
.background_gradient(cmap="Oranges", subset=["Missing Count"])
|
269 |
+
.hide(axis="index")
|
270 |
+
)
|
271 |
+
|
272 |
+
with st.sidebar.expander("🧹 Missing Metadata Summary", expanded=True):
|
273 |
+
st.dataframe(
|
274 |
+
styled_missing_df,
|
275 |
+
use_container_width=True,
|
276 |
+
hide_index=True, # <<< ADD THIS
|
277 |
+
height=min(300, len(missing_df) * 35 + 38)
|
278 |
+
)
|
279 |
+
|
280 |
+
|
281 |
# Calculate Top 10 Subjects
|
282 |
if 'subject' in metadata_df.columns:
|
283 |
top_subjects = (
|