Skip to main content

A simple package to deflate BR currency values using IPCA's historical yearly and monthly indexes

Project description

Python brazilian currency deflator

A simple python package to deflate historical yearly or monthly values using IPCA (Consumers Broad Price Index).

Throught IPEA Data's API the function gather historical IPCA yearly (PRECOS_IPCAG series) and monthly (PRECOS12_IPCAG12 series) indexes to deflate currency values.

Installation:

  • pandas and requests packages are required in your environment (python -m pip install pandas requests).
  • Install the package (pip install deflatepybr)

Usage:

The function takes 5 arguments:

  • data_frame: A Pandas.DataFrame with the data;
  • value_column(str): A column containing the values to deflate;
  • date_column(str): Column name from data_frame with the date range;
  • deflate_year(int): Year that you wanna deflate the series to;
  • deflate_month(int), optional: Month to deflate if you need monthly index values.

If only deflate_year is passed, the functions assumes that Yearly values are desired.

Examples can be found in the example.ipynb jupyter notebook file available on the project's Github page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deflatepybr-0.0.8.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

deflatepybr-0.0.8-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file deflatepybr-0.0.8.tar.gz.

File metadata

  • Download URL: deflatepybr-0.0.8.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for deflatepybr-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a3d8ac17aa5c9ae7674e20c00008e5308643021cde5194d2d28e7a312b46bec9
MD5 99af700ff1a727358390a19b6ec419cf
BLAKE2b-256 d36b237d3dfea0dd9ae9e522ef6fcc7bde08600bae4f7778f05dd23d2ff28ab1

See more details on using hashes here.

File details

Details for the file deflatepybr-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: deflatepybr-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for deflatepybr-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 50af3038e021dfa53f9b16bd5ab6fc21e7d745f696c09b0db483de63d01e5171
MD5 0f36099952e78ca59987d75a122f4c60
BLAKE2b-256 c58bc79cba2b9c7404d6017c97c1132e7d59f4ad8b82fce6f26482e5e71843b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page