diff --git a/app/view/another_window/student/import_student_name.py b/app/view/another_window/student/import_student_name.py index 2ddd3e30..a60addbb 100644 --- a/app/view/another_window/student/import_student_name.py +++ b/app/view/another_window/student/import_student_name.py @@ -448,6 +448,9 @@ def __load_file(self, file_path: str): raise ValueError( get_content_name_async("import_student_name", "unsupported_format") ) + + # 将列名转换为字符串,避免整数列名与UI层字符串不匹配 + data.columns = [str(col) for col in data.columns] # 获取列名 columns = list(data.columns)