Metadata-Version: 2.4
Name: pandoras
Version: 0.2.0
Summary: Undo/Redo functionality for Pandas DataFrames using Apache Arrow
License-Expression: MIT
License-File: LICENSE
Author: al2m4n
Author-email: al2m4n@gmail.com
Requires-Python: >=3.13
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: pyarrow (>=23.0.1,<25.0.0)
Description-Content-Type: text/markdown

# 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:  

```sh
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  

```python
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!** 🎭  

