You've already forked etude_lego_jurassic_world
Ignore le genre inconnu dans la répartition
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user