question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: examples/pandas_multiple.py uses deprecated function(=save)

See original GitHub issue

Current behavior

examples\pandas_multiple.py uses deprecated function (https://pandas.pydata.org/docs/reference/api/pandas.ExcelWriter.save.html)

The following warning will be displayed.

examples\pandas_multiple.py:27: FutureWarning: save is not part of the public API, usage can give unexpected results and will be removed in a future version

Expected behavior

examples\pandas_multiple.py should use close function instead. (https://pandas.pydata.org/docs/reference/api/pandas.ExcelWriter.close.html)

Sample code to reproduce

run examples\pandas_multiple.py

Environment

- XlsxWriter version: 3.0.3
- Python version: Python 3.11.0
- Excel version: 
- OS: Windows 11

Any other information

>git diff origin/main
diff --git a/examples/pandas_multiple.py b/examples/pandas_multiple.py
index 50e7f7b6..e2b04c97 100644
--- a/examples/pandas_multiple.py
+++ b/examples/pandas_multiple.py
@@ -24,4 +24,4 @@ df2.to_excel(writer, sheet_name='Sheet2')
 df3.to_excel(writer, sheet_name='Sheet3')

 # Close the Pandas Excel writer and output the Excel file.
-writer.save()
+writer.close()

No response

OpenOffice and LibreOffice users

  • I have tested the output file with Excel.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
m-tmatmacommented, Dec 17, 2022

Thanks for flagging that. I’ll fix that soon.

Sent #931

0reactions
m-tmatmacommented, Dec 17, 2022

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powerline uses deprecated function inspect.formatargspec ...
In these experiments, the powerline package - specifically its documentation - fails to build from source because a script tries to import the ......
Read more >
Python deprecated functions - Stack Overflow
There aren't any deprecated functions. A few whole modules are deprecated, and one attribute of the Exception class.
Read more >
R60 – Fix bugs and remove deprecated functions in Python
R60 – Fix bugs and remove deprecated functions in Python ... If you were still using these you were doing things wrong anyway....
Read more >
Deprecated Features - Manual - PHP
This is deprecated as of PHP 8.0.0 and can generally be resolved by dropping the default value, without a change in functionality: <?php...
Read more >
Use of deprecated function `plistlib.readPlist()` in `mozinstall.py`
Bug 1674162 - Remove reference to deleted function `plistlib. ... We import this function which was deprecated in Python 3.4 and deleted in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found