Fix: bug on score_rate parsing
This commit is contained in:
parent
358af2aabf
commit
e9a8310f15
@ -69,6 +69,10 @@ def flat_clear_csv(csv_df, no_student_columns=NO_ST_COLUMNS.values()):
|
||||
.replace(VALIDSCORE["NOANSWER"], -1)
|
||||
.apply(lambda x: str(x).replace(",", "."))
|
||||
)
|
||||
df[COLUMNS["score_rate"]] = pd.to_numeric(
|
||||
df[COLUMNS["score_rate"]]
|
||||
.apply(lambda x: str(x).replace(",", "."))
|
||||
)
|
||||
|
||||
return df
|
||||
|
||||
|
@ -64,18 +64,18 @@ def report(csv_file):
|
||||
),
|
||||
)
|
||||
|
||||
with open(csv_file.parent / "description.yml") as f:
|
||||
tribe_desc = yaml.load(f, Loader=yaml.FullLoader)
|
||||
# with open(csv_file.parent / "description.yml") as f:
|
||||
# tribe_desc = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
template = Path(config["templates"]) / "tpl_student.ipynb"
|
||||
dest = Path(config["output"]) / tribe / csv_filename / "students"
|
||||
dest.mkdir(parents=True, exist_ok=True)
|
||||
# template = Path(config["templates"]) / "tpl_student.ipynb"
|
||||
# dest = Path(config["output"]) / tribe / csv_filename / "students"
|
||||
# dest.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
for st in tribe_desc["students"]:
|
||||
click.echo(f"Building {st} report on {assessment}")
|
||||
pm.execute_notebook(
|
||||
str(template),
|
||||
str(dest / f"{st}.ipynb"),
|
||||
parameters=dict(tribe=tribe, student=st, source=str(tribe_dir.absolute())),
|
||||
)
|
||||
# for st in tribe_desc["students"]:
|
||||
# click.echo(f"Building {st} report on {assessment}")
|
||||
# pm.execute_notebook(
|
||||
# str(template),
|
||||
# str(dest / f"{st}.ipynb"),
|
||||
# parameters=dict(tribe=tribe, student=st, source=str(tribe_dir.absolute())),
|
||||
# )
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user