Description
When calling pt.redraw() in pandastable, a FutureWarning (or Pandas4Warning) is triggered because the internal code uses the deprecated copy keyword in pandas methods.
In my case the table is part of tkinter GUI application.
Starting from Pandas 3.0, Copy-on-Write (CoW) is the default behavior. The copy parameter is being phased out as pandas now utilizes a lazy copy mechanism.
Environment
- Pandas version: 3.0.1
- pandastable version: 0.14.0
- Python version: 3.12.3
Error Log
Pandas4Warning: The copy keyword is deprecated and will be removed in a future version.
Copy-on-Write is active in pandas since 3.0 which utilizes a lazy copy mechanism that
defers copies until necessary. Use .copy() to make an eager copy if necessary.
self.pt.redraw()
Fix
The issue is probably in line 499 in core.py:
coldata = coldata.infer_objects(copy=False).fillna('')
Description
When calling
pt.redraw()inpandastable, aFutureWarning(orPandas4Warning) is triggered because the internal code uses the deprecatedcopykeyword in pandas methods.In my case the table is part of tkinter GUI application.
Starting from Pandas 3.0, Copy-on-Write (CoW) is the default behavior. The
copyparameter is being phased out as pandas now utilizes a lazy copy mechanism.Environment
Error Log
Fix
The issue is probably in line 499 in core.py:
coldata = coldata.infer_objects(copy=False).fillna('')