(3-13)~(3-21) xpath반환값이 여러개일경우 첫번째 태그의 결과를 사용하도록 구문 수정

This commit is contained in:
2025-03-05 18:35:31 +09:00
parent f82b317cac
commit 66223549b8
21 changed files with 1585 additions and 53 deletions

29
result_analysis.py Normal file
View File

@@ -0,0 +1,29 @@
import pandas as pd
# 업로드된 엑셀 파일 경로
file_path = r'C:\Users\dra\project\GOM\DIC\250228_DIC_2502A_채점결과.xlsx'
# 엑셀 파일을 불러오기
excel_data = pd.ExcelFile(file_path)
# 시트 이름 확인
print( excel_data.sheet_names )
# "채점 결과" 시트의 데이터 불러오기
df = pd.read_excel(file_path, sheet_name='채점 결과')
# 3_문항만 선택
df_3 = df[[col for col in df.columns if col.startswith("3_")]]
zero_counts_3 = (df_3 == 0).sum()
# 학생 및 총점과 관련 없는 열 삭제
# df = df.drop(["학생", "1_총점", "2_총점", "3_총점"], axis=1)
# # 각 문항에서 점수가 0인 횟수를 계산
# zero_counts = (df == 0).sum()
# 점수가 0인 개별 문항 상위 10개 선택
top_10_zero_counts = zero_counts_3.sort_values(ascending=False).head(10)
print("점수가 0인 개별 문항 상위 10개:")
print(top_10_zero_counts)