ProActuary: Package to read and operate on actuarial file formats
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file proactuary-0.1.2.tar.gz
.
File metadata
- Download URL: proactuary-0.1.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8043d09e7e8a5300c5c56e60d433d98dc9e71bca24d2a647b82d15914de09bd2 |
|
MD5 | a83938ed91fae80b4b0ddc22c2876452 |
|
BLAKE2b-256 | 03b96c2daf143a388009204dcb5e5ef43f3ec0f78839d66b0850a0ca1e818a53 |
File details
Details for the file proactuary-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: proactuary-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6989958c7b4cbc1f93d6d1ffa68b27f19be68604f8465d992aaa8a31dc24a069 |
|
MD5 | 39e7b4f5a75b308e4c6458cf26f03a39 |
|
BLAKE2b-256 | 0ed8d1574b8d7591b7dd2a99f5a8b53699eb62febec8c60fa456a3fb9407917e |