Skip to main content

Undo/Redo functionality for Pandas DataFrames using Apache Arrow

Project description

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 pd re-exports the pandas API and overrides only DataFrame within the pandoras namespace — it does not monkeypatch the real pandas package, 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

  1. Fork the repo on GitHub
  2. Clone it locally
  3. Create a new feature branch
  4. 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! 🎭

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandoras-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pandoras-0.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pandoras-0.2.0.tar.gz.

File metadata

  • Download URL: pandoras-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.13 Darwin/25.5.0

File hashes

Hashes for pandoras-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4449816521f23e3de56394b387721e2fdf7c8add2509d0d51d923d3af173a07d
MD5 80d363d6394d0ba32a2aaad80212772a
BLAKE2b-256 806c9b303bc6cb33c5f0cf432ab4bb35767662ea4fcb7568df457cb6b6943822

See more details on using hashes here.

File details

Details for the file pandoras-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pandoras-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.13 Darwin/25.5.0

File hashes

Hashes for pandoras-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 212d04678b8a783326cbdde8b2dd02563cc4a390f556c952a17968653c83b2a3
MD5 1100ab9ef92cd6879dad2f6b5278f499
BLAKE2b-256 1fc4a2f0761c6cd480cde99a0479e247f8fafb4b19b2248b0c242a8d38ef5a00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page