Skip to main content

era_py

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

Install

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

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

.venv/bin/python -m pytest

era-py provides two import paths:

  • import era_py is the base API built around pandas workflows. Install the ibis extra for the Ibis/Postgres event-study and WRDS helpers.
  • import era_pl is the Polars API and requires pip install "era-py[polars]".

Usage

from era_py import data_info, load_data, ols_dropcollinear

camp = load_data("camp_attendance")
camp_info = data_info("camp_attendance")

Use data_info(name) to inspect a dataset's description, provenance, shape, schema, and variable definitions without loading its observations. Use data_catalog() to return the same information for every packaged dataset.

Testing Optional Dependencies

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

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.

Metadata

Release files for era-py 0.0.35

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for era-py 0.0.35
File Size Uploaded
era_py-0.0.35.tar.gz 3.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for era-py 0.0.35
File Interpreter ABI Platform
era_py-0.0.35-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 MB

Release files / era_py-0.0.35.tar.gz

Download URL era_py-0.0.35.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
8fbbce68689e42476cfe444aefe6a5fbb86ef2211392f7d5f95fa731175c8fe6
BLAKE2b-256 checksum
How to use checksums
5ac047335308b497d95c4d4bf48faeffa252b8fbe32004479f0fa8ad8f86bd19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / era_py-0.0.35-py3-none-any.whl

Download URL era_py-0.0.35-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9d06aaece5858dd0e2976b40b9bde35440ae947f57a6a23b24bb84eca33338ec
BLAKE2b-256 checksum
How to use checksums
aa1f99055716a149d41e339a122e02b65427165cd9c199c28a8552537b3f0f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page