disable magic nan parsing in read_csv (#1115)

This commit is contained in:
Bruce Martin
2020-01-17 09:26:15 -08:00
committed by GitHub
parent 2832393f40
commit 431c8bdabc

View File

@@ -9,7 +9,7 @@ import pandas as pd
def read_labels(fname):
if fname is not None and os.path.exists(fname) and os.path.getsize(fname) > 0:
return pd.read_csv(fname, dtype="category", index_col=0, header=0, comment="#")
return pd.read_csv(fname, dtype="category", index_col=0, header=0, comment="#", keep_default_na=False)
else:
return pd.DataFrame()