Metadata-Version: 2.4
Name: era_py
Version: 0.0.24
Summary: Helper functions and data for Python versions of Empirical Research in Accounting: Tools and Methods
Author: Ian D. Gow
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: pyarrow
Requires-Dist: statsmodels
Requires-Dist: scipy
Requires-Dist: ibis-framework[postgres]
Requires-Dist: requests
Requires-Dist: gdown
Requires-Dist: pyreadr
Requires-Dist: patsy
Requires-Dist: python-dotenv
Requires-Dist: scikit-learn
Provides-Extra: polars
Requires-Dist: polars; extra == "polars"
Provides-Extra: tables
Requires-Dist: great-tables; extra == "tables"
Provides-Extra: plots
Requires-Dist: plotnine; extra == "plots"

# era_py

Helpers for the Python port of *Empirical Research in Accounting: Tools and Methods*.

## Install

```
pip install era-py
pip install "era-py[polars]"
pip install "era-py[tables]"
```

For repository development, prefer the checked-in virtual environment:

```bash
.venv/bin/python -m pytest
```

`era-py` provides two import paths:

- `import era_py` is the base API built around pandas/Ibis-style workflows.
- `import era_pl` is the Polars API and requires `pip install "era-py[polars]"`.

## Usage
```python
from era_py import load_data, ols_dropcollinear

camp = load_data("camp_attendance")
```

## Testing Optional Dependencies

For quick checks of optional extras without changing your local environment, use
`uv run --with ...`:

```bash
PYTHONPATH=src uv run --with polars python -c "import era_pl; print(era_pl.__version__)"
```

This is useful for verifying the `era_pl` import path and other Polars-specific
behavior without permanently installing `polars` into your project environment.
