ruanchaves commited on
Commit
44ebf78
1 Parent(s): 7fb0cdc
Files changed (1) hide show
  1. b2w-reviews01.py +5 -0
b2w-reviews01.py CHANGED
@@ -92,7 +92,12 @@ class Reviews(datasets.GeneratorBasedBuilder):
92
  except ValueError:
93
  row["reviewer_birth_year"] = None
94
 
 
 
 
 
95
  return row
 
96
  records = pd.read_csv(filepath).to_dict("records")
97
  for idx, row in enumerate(records):
98
  yield idx, process_row(row)
 
92
  except ValueError:
93
  row["reviewer_birth_year"] = None
94
 
95
+ for key, value in row.items():
96
+ if value == "nan":
97
+ row[key] = None
98
+
99
  return row
100
+
101
  records = pd.read_csv(filepath).to_dict("records")
102
  for idx, row in enumerate(records):
103
  yield idx, process_row(row)