Pandoras 🐼🎭
Undo/Redo functionality for Pandas DataFrames using Apache Arrow.
Pandoras extends pandas.DataFrame to add undo/redo capabilities, allowing you to revert accidental modifications easily.
🚀 Installation
You can install pandoras via pip:
pip install pandoras
📌 Features
✔ Undo and redo modifications (drop, rename, replace, etc.)
✔ Leverages Apache Arrow for efficient state storage
✔ Supports Pandas' native operations
💡 Example Usage
import pandoras as pd # drop-in for pandas; pd.DataFrame is PandorasDataFrame
# Create a DataFrame
df = pd.DataFrame({"A": [1, 2, 3], "B": [4, None, 6]})
# Drop a column (in place)
df.drop(columns=["B"], inplace=True)
print("After drop:\n", df)
# Undo the drop
df.undo()
print("After undo:\n", df)
# Redo the drop
df.redo()
print("After redo:\n", df)
import pandoras as pdre-exports the pandas API and overrides onlyDataFramewithin the pandoras namespace — it does not monkeypatch the realpandaspackage, so the rest of your process is unaffected. You can also use it explicitly:from pandoras import PandorasDataFrame.
Tracked operations
Undo/redo records state for the inplace=True form of these methods:
drop, rename, replace, reset_index, set_index, fillna, dropna,
sort_values, sort_index. The non-inplace form returns a new frame and leaves
history untouched. Use history_size / future_size to inspect the stacks and
clear_history() to reset them.
🔮 Future Improvements
🚀 Diff-based state tracking instead of storing full DataFrame copies
🚀 Optimize memory usage using compression
🌜 License
Pandoras is open-source and licensed under the MIT License. Contributions are welcome!
🤝 Contributing
- Fork the repo on GitHub
- Clone it locally
- Create a new feature branch
- Submit a pull request
🌍 Connect
📌 GitHub Repo: https://github.com/al2m4n/pandoras/
📌 PyPI Package: https://pypi.org/project/pandoras/
📌 Author: Arman Bahlakeh
🐼 Pandoras – Making Pandas Undoable! 🎭
Release files for pandoras 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pandoras-0.2.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pandoras-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / pandoras-0.2.0.tar.gz
| Download URL | pandoras-0.2.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4449816521f23e3de56394b387721e2fdf7c8add2509d0d51d923d3af173a07d
|
|
BLAKE2b-256 checksum How to use checksums |
806c9b303bc6cb33c5f0cf432ab4bb35767662ea4fcb7568df457cb6b6943822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.3 CPython/3.12.13 Darwin/25.5.0
|
Release files / pandoras-0.2.0-py3-none-any.whl
| Download URL | pandoras-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
212d04678b8a783326cbdde8b2dd02563cc4a390f556c952a17968653c83b2a3
|
|
BLAKE2b-256 checksum How to use checksums |
1fc4a2f0761c6cd480cde99a0479e247f8fafb4b19b2248b0c242a8d38ef5a00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.3 CPython/3.12.13 Darwin/25.5.0
|