# Cronus Eater: A simple tool to get time series from spreadsheets
<div align="center">
<img width="450" height="278" src="https://raw.githubusercontent.com/breno-jesus-fernandes/cronus-eater/main/docs/img/cronus-eater-logo.png"><br>
</div>
[![Pipeline](https://github.com/breno-jesus-fernandes/cronus-eater/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/breno-jesus-fernandes/cronus-eater/actions/workflows/pipeline.yaml)
[![Documentation Status](https://readthedocs.org/projects/cronus-eater/badge/?version=latest)](https://cronus-eater.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/breno-jesus-fernandes/cronus-eater/branch/main/graph/badge.svg?token=KDEDMQ6B2E)](https://codecov.io/gh/breno-jesus-fernandes/cronus-eater)
[![PyPI Latest Release](https://img.shields.io/pypi/v/cronus-eater.svg)](https://pypi.org/project/cronus-eater/)
[![Package Status](https://img.shields.io/pypi/status/cronus-eater.svg)](https://pypi.org/project/cronus-eater/)
[![Python: 3.7 | 3.8 | 3.9 | 3.10 | 3.11](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/cronus-eater/)
[![Downloads](https://static.pepy.tech/badge/cronus-eater)](https://pepy.tech/project/cronus-eater)
[![Code style: blue](https://img.shields.io/badge/code%20style-blue-blue.svg)](https://github.com/grantjenks/blue)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Packaged with Poetry](https://img.shields.io/badge/packaging-poetry-cyan.svg)](https://python-poetry.org/)
[![LICENSE](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/breno-jesus-fernandes/cronus-eater/blob/main/LICENSE)
Extract and normalize time series from any spreadsheet with differents patterns.
### Where is the data I want?
- There's just one place to get the data I want, but ... it's mess! I need to spend some time to normalize this times series.
```python
import pandas as pd
raw_dataframe = pd.read_excel('historical_series_3Q22.xlsx', sheet_name='random_sheet')
raw_dataframe.head()
```
| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| --- | --- | -------------------------- | --- | --- | ------- | ------- | --- | ------- | ------- | --- |
| 0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 1 | NaN | Holdings Ltd. | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 2 | NaN | NaN | NaN | NaN | 3Q22 | 2Q22 | NaN | 1Q22 | 2022 | NaN |
| 3 | NaN | Amounts in thousands of R$ | NaN | NaN | R$ | R$ | NaN | R$ | R$ | NaN |
| 4 | NaN | Cash Flow | NaN | NaN | $500.23 | $302.81 | NaN | $106.12 | $900.00 | NaN |
### Let's devours this times series
- No need to worry. You just need to bring the raw dataframe to Cronus Eater and you are ready to start the analysis.
This way, you spend more time on what is really important for you.
```python
import cronus_eater
times_series_df = cronus_eater.extract(raw_dataframe)
times_series_df.head()
```
| | Numeric Index | Label Index | Table Order | Time | Value |
| --- | ------------- | ----------- | ----------- | ---- | ------ |
| 0 | 4 | Cash Flow | 1 | 3Q22 | 500.23 |
| 1 | 4 | Cash Flow | 1 | 2Q22 | 302.81 |
| 2 | 4 | Cash Flow | 1 | 1Q22 | 106.12 |
| 3 | 4 | Cash Flow | 1 | 2022 | 900.00 |
### But If I need to consume a lot of dataframes from a spreedsheet?
- We got you, just use "extract_many"
```python
raw_dataframes = pd.read_excel('historical_series_3Q22.xlsx', sheet_name=None)
times_series_df = cronus_eater.extract_many(raw_dataframes)
times_series_df.head()
```
| | Numeric Index | Label Index | Table Order | Time | Value | Sheet Name |
| --- | ------------- | ----------- | ----------- | ---- | ------ | -------------- |
| 0 | 4 | Cash Flow | 1 | 3Q22 | 500.23 | random_sheet |
| 1 | 4 | Cash Flow | 1 | 2Q22 | 302.81 | random_sheet |
| 2 | 7 | ROE | 1 | 1Q22 | 106.12 | random_sheet_2 |
| 3 | 7 | ROE | 1 | 2022 | 900.00 | random_sheet_2 |
## Where to get it
The source code is currently hosted on GitHub at: <https://github.com/breno-jesus-fernandes/cronus-eater>
Binary installers for the latest released version is going to available at the [Python Package Index (PyPI)](https://pypi.org/project/cronus-eater).
```sh
# Through pip
pip install cronus-eater
```
```sh
# Through poetry
poetry add cronus-eater
```
## License
[MIT](https://github.com/breno-jesus-fernandes/cronus-eater/blob/main/LICENSE)
## Contributing to Cronus Eater
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. See https://github.com/breno-jesus-fernandes/cronus-eater/tree/main/docs for instructions.
Raw data
{
"_id": null,
"home_page": "https://github.com/breno-jesus-fernandes/cronus-eater",
"name": "cronus-eater",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.1,<3.12",
"maintainer_email": "",
"keywords": "time series,historical series,chronological data sequence,extract,normalize,spreadsheet",
"author": "Breno Fernandes",
"author_email": "breno.de.jesus.fernandes@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/6d/c9bf0776352e1d93bdba4c5ed156b385e1b82d2e9aaa43a41511f6c573ba/cronus_eater-0.1.0a10.tar.gz",
"platform": null,
"description": "# Cronus Eater: A simple tool to get time series from spreadsheets\n\n<div align=\"center\">\n <img width=\"450\" height=\"278\" src=\"https://raw.githubusercontent.com/breno-jesus-fernandes/cronus-eater/main/docs/img/cronus-eater-logo.png\"><br>\n</div>\n\n[![Pipeline](https://github.com/breno-jesus-fernandes/cronus-eater/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/breno-jesus-fernandes/cronus-eater/actions/workflows/pipeline.yaml)\n[![Documentation Status](https://readthedocs.org/projects/cronus-eater/badge/?version=latest)](https://cronus-eater.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/breno-jesus-fernandes/cronus-eater/branch/main/graph/badge.svg?token=KDEDMQ6B2E)](https://codecov.io/gh/breno-jesus-fernandes/cronus-eater)\n[![PyPI Latest Release](https://img.shields.io/pypi/v/cronus-eater.svg)](https://pypi.org/project/cronus-eater/)\n[![Package Status](https://img.shields.io/pypi/status/cronus-eater.svg)](https://pypi.org/project/cronus-eater/)\n[![Python: 3.7 | 3.8 | 3.9 | 3.10 | 3.11](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/cronus-eater/)\n[![Downloads](https://static.pepy.tech/badge/cronus-eater)](https://pepy.tech/project/cronus-eater)\n[![Code style: blue](https://img.shields.io/badge/code%20style-blue-blue.svg)](https://github.com/grantjenks/blue)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![Packaged with Poetry](https://img.shields.io/badge/packaging-poetry-cyan.svg)](https://python-poetry.org/)\n[![LICENSE](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/breno-jesus-fernandes/cronus-eater/blob/main/LICENSE)\n\n\n\nExtract and normalize time series from any spreadsheet with differents patterns.\n\n\n### Where is the data I want?\n\n- There's just one place to get the data I want, but ... it's mess! I need to spend some time to normalize this times series.\n\n```python\n\nimport pandas as pd\n\nraw_dataframe = pd.read_excel('historical_series_3Q22.xlsx', sheet_name='random_sheet')\nraw_dataframe.head()\n\n```\n\n| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |\n| --- | --- | -------------------------- | --- | --- | ------- | ------- | --- | ------- | ------- | --- |\n| 0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |\n| 1 | NaN | Holdings Ltd. | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |\n| 2 | NaN | NaN | NaN | NaN | 3Q22 | 2Q22 | NaN | 1Q22 | 2022 | NaN |\n| 3 | NaN | Amounts in thousands of R$ | NaN | NaN | R$ | R$ | NaN | R$ | R$ | NaN |\n| 4 | NaN | Cash Flow | NaN | NaN | $500.23 | $302.81 | NaN | $106.12 | $900.00 | NaN |\n\n### Let's devours this times series\n\n- No need to worry. You just need to bring the raw dataframe to Cronus Eater and you are ready to start the analysis.\nThis way, you spend more time on what is really important for you.\n\n```python\n\nimport cronus_eater\ntimes_series_df = cronus_eater.extract(raw_dataframe)\ntimes_series_df.head()\n\n```\n\n\n| | Numeric Index | Label Index | Table Order | Time | Value |\n| --- | ------------- | ----------- | ----------- | ---- | ------ |\n| 0 | 4 | Cash Flow | 1 | 3Q22 | 500.23 |\n| 1 | 4 | Cash Flow | 1 | 2Q22 | 302.81 |\n| 2 | 4 | Cash Flow | 1 | 1Q22 | 106.12 |\n| 3 | 4 | Cash Flow | 1 | 2022 | 900.00 |\n\n\n### But If I need to consume a lot of dataframes from a spreedsheet?\n\n- We got you, just use \"extract_many\"\n\n```python\n\nraw_dataframes = pd.read_excel('historical_series_3Q22.xlsx', sheet_name=None)\ntimes_series_df = cronus_eater.extract_many(raw_dataframes)\ntimes_series_df.head()\n\n```\n\n| | Numeric Index | Label Index | Table Order | Time | Value | Sheet Name |\n| --- | ------------- | ----------- | ----------- | ---- | ------ | -------------- |\n| 0 | 4 | Cash Flow | 1 | 3Q22 | 500.23 | random_sheet |\n| 1 | 4 | Cash Flow | 1 | 2Q22 | 302.81 | random_sheet |\n| 2 | 7 | ROE | 1 | 1Q22 | 106.12 | random_sheet_2 |\n| 3 | 7 | ROE | 1 | 2022 | 900.00 | random_sheet_2 |\n\n\n\n## Where to get it\n\nThe source code is currently hosted on GitHub at: <https://github.com/breno-jesus-fernandes/cronus-eater>\n\nBinary installers for the latest released version is going to available at the [Python Package Index (PyPI)](https://pypi.org/project/cronus-eater).\n\n\n```sh\n# Through pip\npip install cronus-eater\n```\n\n```sh\n# Through poetry\npoetry add cronus-eater\n```\n\n## License\n\n[MIT](https://github.com/breno-jesus-fernandes/cronus-eater/blob/main/LICENSE)\n\n## Contributing to Cronus Eater\nAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. See https://github.com/breno-jesus-fernandes/cronus-eater/tree/main/docs for instructions.\n\n\n\n ",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple tool to get time series from spreadsheets",
"version": "0.1.0a10",
"split_keywords": [
"time series",
"historical series",
"chronological data sequence",
"extract",
"normalize",
"spreadsheet"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3059adbea0acc250ffc3b4e177dcb2e95767ca192c32676d7dc7c547f68552ba",
"md5": "147cd7e67447dba892ccc4183946b4e2",
"sha256": "41174d2f5e21182a1971500337524ab6dd2f63188bedb90cd8c9f6a00420bf0b"
},
"downloads": -1,
"filename": "cronus_eater-0.1.0a10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "147cd7e67447dba892ccc4183946b4e2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.1,<3.12",
"size": 11054,
"upload_time": "2023-03-13T23:26:47",
"upload_time_iso_8601": "2023-03-13T23:26:47.761824Z",
"url": "https://files.pythonhosted.org/packages/30/59/adbea0acc250ffc3b4e177dcb2e95767ca192c32676d7dc7c547f68552ba/cronus_eater-0.1.0a10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cb6dc9bf0776352e1d93bdba4c5ed156b385e1b82d2e9aaa43a41511f6c573ba",
"md5": "e2a0edf6356df92188d88949fb93cd66",
"sha256": "f81d9a9bd5fef0dcda5840a47fc138baa9647389fa52e82bf8430c849ce2a56e"
},
"downloads": -1,
"filename": "cronus_eater-0.1.0a10.tar.gz",
"has_sig": false,
"md5_digest": "e2a0edf6356df92188d88949fb93cd66",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.1,<3.12",
"size": 10222,
"upload_time": "2023-03-13T23:26:49",
"upload_time_iso_8601": "2023-03-13T23:26:49.330873Z",
"url": "https://files.pythonhosted.org/packages/cb/6d/c9bf0776352e1d93bdba4c5ed156b385e1b82d2e9aaa43a41511f6c573ba/cronus_eater-0.1.0a10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-13 23:26:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "breno-jesus-fernandes",
"github_project": "cronus-eater",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cronus-eater"
}