Skip to content

Commit

Permalink
pandas.to_csv: lineterminator
Browse files Browse the repository at this point in the history
From docs:
> Changed in version 1.5.0: Previously was line_terminator,
> changed for consistency with read_csv and the standard library ‘csv’ module.
  • Loading branch information
dhimmel committed May 3, 2023
1 parent 34bac1b commit 4dde45f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions nxontology/tests/similarity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ def get_similarity_tsv(nxo: NXOntology[str]) -> str:
ic_metrics=Node_Info.ic_metrics,
)
sim_df = pd.DataFrame(sims)
tsv = sim_df.to_csv(
sep="\t", index=False, float_format="%.3g", line_terminator="\n"
)
tsv = sim_df.to_csv(sep="\t", index=False, float_format="%.3g", lineterminator="\n")
assert isinstance(tsv, str)
return tsv

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Homepage = "https://github.com/related-sciences/nxontology"
[project.optional-dependencies]
dev = [
"fire",
"pandas",
"pandas>=1.5.0",
"pre-commit",
"pytest",
]
Expand Down

0 comments on commit 4dde45f

Please sign in to comment.