Skip to content

Commit

Permalink
dropna before saving to disk
Browse files Browse the repository at this point in the history
  • Loading branch information
semio committed Apr 14, 2017
1 parent a1c4f05 commit 07a7a74
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ddf_utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@ def csvs_to_ddf(files, out_path):
for k in keys[:-1]:
df[k] = df[k].map(to_concept_id)
df.columns = df.columns.map(to_concept_id)
df.to_csv(join(out_path,
'ddf--datapoints--{}--by--{}.csv'.format(
to_concept_id(c), '--'.join(keys_alphanum))),
index=False)
(df.dropna()
.to_csv(join(out_path,
'ddf--datapoints--{}--by--{}.csv'.format(
to_concept_id(c), '--'.join(keys_alphanum))),
index=False))

# output concepts
concepts_df.to_csv(join(out_path, 'ddf--concepts.csv'))
Expand Down

0 comments on commit 07a7a74

Please sign in to comment.