Fill some column nan with ""
This commit is contained in:
		| @@ -7,7 +7,7 @@ from math import ceil, floor | ||||
| import logging | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| NOANSWER = "na" | ||||
| NOANSWER = "." | ||||
| NORATED = "" | ||||
|  | ||||
| # Values manipulations | ||||
| @@ -479,6 +479,10 @@ def digest_flat_df(flat_df): | ||||
|     """ | ||||
|     df = flat_df.dropna(subset=["Note"]) | ||||
|  | ||||
|     df["Question"].fillna("", inplace = True) | ||||
|     df["Exercice"].fillna("", inplace = True) | ||||
|     df["Domaine"].fillna("", inplace = True) | ||||
|     df["Competence"].fillna("", inplace = True) | ||||
|     df["Mark"] = compute_marks(df) | ||||
|     df["Level"] = compute_level(df) | ||||
|     df["Latex_rep"] = compute_latex_rep(df) | ||||
|   | ||||
| @@ -132,6 +132,11 @@ def extract_flat_marks(ws, | ||||
|         flat = flat_df_students(sheet, students) | ||||
|         flat_df = pd.concat([flat_df, flat]) | ||||
|  | ||||
|     flat_df["Question"].fillna("", inplace = True) | ||||
|     flat_df["Exercice"].fillna("", inplace = True) | ||||
|     flat_df["Commentaire"].fillna("", inplace = True) | ||||
|     flat_df["Competence"].fillna("", inplace = True) | ||||
|  | ||||
|     return flat_df | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user