character refine

This commit is contained in:
2026-01-23 08:41:23 +01:00
parent 0e1126563e
commit 42f2d775c7
6 changed files with 319 additions and 70 deletions

View File

@@ -40,8 +40,9 @@ def plot_average_scores_with_counts(
Plotly figure object.
"""
# Calculate average and count of non-null values for each column
# Exclude _recordId column
stats = []
for col in df.columns:
for col in [c for c in df.columns if c != '_recordId']:
avg_score = df[col].mean()
non_null_count = df[col].drop_nulls().len()
stats.append({
@@ -126,8 +127,9 @@ def plot_top3_ranking_distribution(
go.Figure
Plotly figure object.
"""
# Exclude _recordId column
stats = []
for col in df.columns:
for col in [c for c in df.columns if c != '_recordId']:
# Count occurrences of each rank (1, 2, 3)
# We ensure we're just counting the specific integer values
rank1 = df.filter(pl.col(col) == 1).height