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

View File

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