Datasets:

Lauler commited on
Commit
f405d8e
·
1 Parent(s): 8884e59

NAType values to None

Browse files
Files changed (1) hide show
  1. rixvox.py +2 -0
rixvox.py CHANGED
@@ -177,6 +177,8 @@ class Rixvox(datasets.GeneratorBasedBuilder):
177
  df_meta = pd.read_parquet(meta_paths[self.config.name])
178
 
179
  df_meta = df_meta.set_index("filename", drop=False)
 
 
180
 
181
  for i, audio_archive in enumerate(archive_iters):
182
  for filename, file in audio_archive:
 
177
  df_meta = pd.read_parquet(meta_paths[self.config.name])
178
 
179
  df_meta = df_meta.set_index("filename", drop=False)
180
+ # Column contains NAType, so we convert to object type column and NAType to None values.
181
+ df_meta["birth_year"] = df_meta["birth_year"].astype("object").where(df_meta["birth_year"].notnull(), None)
182
 
183
  for i, audio_archive in enumerate(archive_iters):
184
  for filename, file in audio_archive: