Skip to main content

ProActuary – Package to read and operate on actuarial file formats

This Python package provides utilities tailored for specialized text formats frequently encountered in actuarial work.

Background

Within the actuarial domain, there's specific file formats that, at a glance, appears similar to a CSV. However, it incorporates some unique characteristics:

  • Allows for preamble content before the header.
  • Allows for type annotations.
  • Supports metadata appended after the main content.
  • Starting any data line with an asterisk.
  • Enforces headers not to be surrounded by quotes, while all other data strings should be.

Given the intricate nature of this format and the emphasis on data integrity in actuarial work, there's a demand for a toolset that can seamlessly handle such files. Enter ProActuary.

Features

  • Read Functionality: Efficiently convert specialized actuarial text files into a pandas DataFrame.
  • Write Functionality: Export pandas DataFrames back into the specialized actuarial text format, adhering to its nuances.
  • Flexibility: Additional parameters can be passed via kwargs, making the package adaptable and extensible.
  • Consistency: Adopts a naming convention similar to pandas, ensuring familiarity and ease of use.

Installation

To install ProActuary:

pip install proactuary

Usage

Reading Files

from proactuary import read_pro

df = read_pro("path_to_file.pro")

You can pass additional parameters via kwargs to tailor the reading process to specific needs.

Writing Files

from proactuary import to_pro

to_pro(df, "output_filename.pro")

Writing ensures that the file conforms to the specialized format's requirements, such as the specific handling of headers and quoted strings.

Dependencies

While the package is self-sufficient for most tasks, it relies on pandas for DataFrame operations. Detailed dependencies can be found in the requirements.txt file.

Contribution & Future Development

This package is an ongoing effort to streamline the process of handling actuarial file formats. Contributions, feedback, and suggestions are most welcome! Fork the repository and submit a pull request or open an issue.

License

ProActuary is licensed under the MIT License. For more details, consult the LICENSE file.

Metadata

Release files for proactuary 0.1.2

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

Source distribution (sdist)

Source distribution for proactuary 0.1.2
File Size Uploaded
proactuary-0.1.2.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for proactuary 0.1.2
File Interpreter ABI Platform
proactuary-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / proactuary-0.1.2.tar.gz

Download URL proactuary-0.1.2.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8043d09e7e8a5300c5c56e60d433d98dc9e71bca24d2a647b82d15914de09bd2
BLAKE2b-256 checksum
How to use checksums
03b96c2daf143a388009204dcb5e5ef43f3ec0f78839d66b0850a0ca1e818a53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / proactuary-0.1.2-py3-none-any.whl

Download URL proactuary-0.1.2-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6989958c7b4cbc1f93d6d1ffa68b27f19be68604f8465d992aaa8a31dc24a069
BLAKE2b-256 checksum
How to use checksums
0ed8d1574b8d7591b7dd2a99f5a8b53699eb62febec8c60fa456a3fb9407917e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

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