From 0f0969bbb0d34735f3cb21d4d44c0afb74da1ab8 Mon Sep 17 00:00:00 2001 From: Takahiro OHKUBO Date: Thu, 9 Jul 2026 07:27:34 +0900 Subject: [PATCH] Output the number of respondents. --- Readme.org | 1 - analyze_lab_placement_survey.py | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Readme.org b/Readme.org index c89aa31..94bbf64 100644 --- a/Readme.org +++ b/Readme.org @@ -175,7 +175,6 @@ df__["値"].std() . ├── README.org ├── analyze_lab_assignment_survey.py -├── analyze_lab_assignment_survey.xlsx └── googleform.txt #+end_example diff --git a/analyze_lab_placement_survey.py b/analyze_lab_placement_survey.py index 2c72537..5327d81 100755 --- a/analyze_lab_placement_survey.py +++ b/analyze_lab_placement_survey.py @@ -156,12 +156,14 @@ if __name__ == "__main__": df_r.loc[n, "GPA std"] = df__["値"].std() df_r[["在校生", "編入生"]] = df_r[["在校生", "編入生"]].astype(int) # 表示用 + df_show = df_r.copy() df_show.index.name = "研究室" df_show["GPA mean"] = df_show["GPA mean"].round(1) df_show["GPA std"] = df_show["GPA std"].round(1) - print( - f"{'研究室':>6} " + print("-" * 52) + print("回答者数:", df.shape[0]) + print(f"{'研究室':>6} " f"{'在校生':>6} " f"{'編入生':>6} " f"{'GPA mean':>10} "