Skip to content

Commit

Permalink
Remove deprecated code from io.py (#203)
Browse files Browse the repository at this point in the history
Remove the use of `pandas.save()` ([deprecated since pandas
1.5](https://pandas.pydata.org/pandas-docs/version/1.5.0/reference/api/pandas.ExcelWriter.save.html)).
`pandas.close()` is now sufficient to [save and close a
file](https://pandas.pydata.org/docs/dev/reference/api/pandas.ExcelWriter.close.html#pandas.ExcelWriter.close).
I have also updated the `setup.cfg` to require pandas 2.0.2 (the latest
release at the time of the PR).
  • Loading branch information
jamesyan-git committed Jun 1, 2023
1 parent ecf6a8f commit 667ee63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ install_requires =
networkx>=2.7
numba>=0.53
numpy>=1.21
pandas>=1.3
pandas>=2.0.2
openpyxl>=2.6
scikit-image>=0.17.1
scipy>=1.7
Expand Down
1 change: 0 additions & 1 deletion src/skan/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ def write_excel(filename, **kwargs):
obj = _params_dict_to_dataframe(obj)
if isinstance(obj, pd.DataFrame):
obj.to_excel(writer, sheet_name=sheet_name)
writer.save()
writer.close()

0 comments on commit 667ee63

Please sign in to comment.