Metadata-Version: 2.4
Name: dfpretty
Version: 0.1.0
Summary: Pretty-print pandas DataFrames as styled interactive HTML tables in your browser
License: MIT License
        
        Copyright (c) 2025 YOUR_NAME
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/YOUR_USERNAME/dfpretty
Project-URL: Repository, https://github.com/YOUR_USERNAME/dfpretty
Project-URL: Bug Tracker, https://github.com/YOUR_USERNAME/dfpretty/issues
Keywords: pandas,dataframe,visualization,html,jupyter
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.5
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# dfpretty

> Pretty-print pandas DataFrames as styled interactive HTML tables — with theme switcher and Excel-like column filters.

Opens a standalone browser window (no Jupyter required).

```python
from dfpretty import pretty
pretty(df, theme="tableau", title="Sales Q1")
```

![themes preview](https://raw.githubusercontent.com/YOUR_USERNAME/dfpretty/main/docs/preview.png)

---

## Installation

```bash
# pip
pip install dfpretty

# conda (once on conda-forge)
conda install -c conda-forge dfpretty
```

---

## Usage

```python
import pandas as pd
from dfpretty import pretty

df = pd.read_csv("data.csv")

pretty(df)                                        # dark theme, opens browser
pretty(df, theme="tableau", title="My Table")     # Tableau style
pretty(df, theme="terminal")                      # green-on-black
pretty(df, locale="de-DE")                        # German number formatting
pretty(df, save="report.html", open_browser=False) # save without opening
```

### Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `df` | `pd.DataFrame` | — | DataFrame to display |
| `title` | `str` | `"DataFrame"` | Title in the top bar |
| `theme` | `str` | `"dark"` | Initial colour theme |
| `locale` | `str` | `"en-US"` | BCP-47 locale for number formatting |
| `save` | `str \| Path \| None` | `None` | Save HTML to this path |
| `open_browser` | `bool` | `True` | Open browser automatically |

**Returns:** `Path` — path to the generated HTML file.

---

## Themes

Themes can be switched live in the browser via the buttons in the top bar.

| Name | Style |
|---|---|
| `dark` | Deep blue-slate, blue accents |
| `tableau` | Cream background, charcoal header, orange accent — Tableau-inspired |
| `light` | Clean white, indigo accents |
| `terminal` | Black, green-on-black Matrix style |
| `notion` | Soft white, editorial typography |

---

## Features

- **Column filters** — click ▾ on any column header to filter by value (Excel-style)
- **Global search** — filter across all columns at once
- **Sort** — click any column name to sort ↑ ↓
- **Number formatting** — integers and floats formatted with locale-aware separators
- **Theme switcher** — switch themes live without reopening
- **Save to file** — export a standalone HTML report

---

## Development

```bash
git clone https://github.com/YOUR_USERNAME/dfpretty
cd dfpretty
pip install -e ".[dev]"
pytest
```

---

## License

MIT
