Skip to content

Commit

Permalink
Fix dataset subset selection
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Apr 15, 2023
1 parent 1e3e8ef commit 1700a51
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions synergy_dataset/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,16 @@ def build_dataset(argv):
Path(args.output).mkdir(exist_ok=True, parents=True)

if args.dataset is not None:
d = Dataset(args.dataset)
result = d.to_frame()

if args.output:
result.to_csv(args.output, index=False)
for name in args.dataset:
d = Dataset(name)
result = d.to_frame()

if args.output:
result.to_csv(
Path(args.output, f"{name}.csv"),
index=False
)
else:
for dataset in tqdm(list(iter_datasets())):
dataset.to_frame(args.vars).to_csv(
Expand Down

0 comments on commit 1700a51

Please sign in to comment.