refactor WhoLikesIt.py and PandasTutorial.py

This commit is contained in:
Michael Schären 2026-03-13 21:01:04 +01:00
parent d0609303dc
commit 9134f059da
2 changed files with 1 additions and 6 deletions

View File

@ -5,9 +5,6 @@ def export_csv_with_name_and_grade(student_name: str, grade: str):
students_df = pd.read_csv("files/students.csv", index_col=False) students_df = pd.read_csv("files/students.csv", index_col=False)
grades_df = pd.read_csv("files/grades.csv", index_col=False) grades_df = pd.read_csv("files/grades.csv", index_col=False)
print(students_df)
print(grades_df)
students_grades_df = students_df.merge( students_grades_df = students_df.merge(
grades_df, left_on="Student_ID", right_on="ID" grades_df, left_on="Student_ID", right_on="ID"
) )

View File

@ -1,7 +1,5 @@
def likes(names): def likes(names):
length = len(names[:4]) match len(names):
match length:
case 0: case 0:
return "no one likes this" return "no one likes this"
case 1: case 1: