import pandas as pd FILE_NAME = "gaia.jsonl" #FILE_NAME = "gaia_20.jsonl" def get_questions(level): df = pd.read_json(FILE_NAME, lines = True) level_df = df[df["Level"] == level] result = [] for index, row in level_df.iterrows(): result.append([row["Level"], row["Question"], row["file_name"], row["Final answer"]]) return result