1

Ignore le genre inconnu dans la répartition

This commit is contained in:
2025-12-03 22:44:48 +01:00
parent 871539c4f7
commit e5dbf7bbaa
4 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,9 @@ def load_gender_counts(path: Path) -> List[dict]:
def plot_minifig_gender_share(counts_path: Path, destination_path: Path) -> None:
"""Trace un diagramme circulaire de la répartition des minifigs par genre."""
rows = load_gender_counts(counts_path)
rows = [
row for row in load_gender_counts(counts_path) if row["gender"].strip().lower() in ("male", "female")
]
if not rows:
return
genders = [row["gender"] for row in rows]