Handle null bareme in note_to_level

This commit is contained in:
Benjamin Bertrand 2017-03-21 20:35:38 +03:00
parent dcc6dc7334
commit 873184fcb5
1 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,9 @@ def note_to_level(x):
if pd.isnull(x["Note"]):
return "na"
if pd.isnull(x["Bareme"]) or x["Bareme"] == 0:
return "na"
if x["Niveau"]:
return int(x["Note"])
else: