Skip to content

Commit

Permalink
Merge pull request #144 from kurusugawa-computer/fix/print_csv
Browse files Browse the repository at this point in the history
to_csv_kwargs = None の場合に**で展開出来ずに死ぬところを修正
  • Loading branch information
yuji38kwmt authored Dec 26, 2019
2 parents 00add04 + bf5cb8a commit 3b5002e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion annofabcli/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ def print_csv(df: pandas.DataFrame, output: Optional[str] = None, to_csv_kwargs:
Path(output).parent.mkdir(parents=True, exist_ok=True)

path_or_buf = sys.stdout if output is None else output
df.to_csv(path_or_buf, **to_csv_kwargs)

if to_csv_kwargs is None:
df.to_csv(path_or_buf)
else:
df.to_csv(path_or_buf, **to_csv_kwargs)


def print_id_list(id_list: List[Any], output: Optional[str]):
Expand Down

0 comments on commit 3b5002e

Please sign in to comment.