Skip to content

Commit

Permalink
increase decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-rivera committed Nov 10, 2024
1 parent 8e80f49 commit 3a85278
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pydeflate/sources/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _add_deflator(

# If base value is found and valid, calculate the deflator
if base_value.size > 0 and pd.notna(base_value[0]):
group[f"{exchange}_D"] = round(100 * group[exchange] / base_value[0], 5)
group[f"{exchange}_D"] = round(100 * group[exchange] / base_value[0], 6)

return group

Expand All @@ -231,7 +231,11 @@ def _add_deflator(

# Apply the deflator computation for each group of 'entity' and 'entity_code'
return df.groupby(grouper, group_keys=False).apply(
_add_deflator, measure=base_year_measure, exchange=exchange, year=year
_add_deflator,
measure=base_year_measure,
exchange=exchange,
year=year,
include_groups=True,
)


Expand Down

0 comments on commit 3a85278

Please sign in to comment.