code: def inflate_currency(
      df: pd.DataFrame,
      column_name: str = None,
      country: str = None,
      currency_year: int = None,
      to_year: int = None,
      make_new_column: bool = False,
  ) -> pd.DataFrame:
      """
      Inflates a column of monetary values from one year to another, based on
      the currency's country.
  
      The provided country can be any economy name or code from the World Bank
      [list of economies](https://databank.worldbank.org/data/download/site-content/CLASS.xls).
  
      **Note**: This method mutates the original DataFrame.
  
      Examples:
  
          >>> import pandas as pd
          >>> import janitor.finance
          >>> df = pd.DataFrame({"profit":[100.10, 200.20, 300.30, 400.40, 500.50]})
          >>> df
             profit
          0   100.1
          1   200.2
          2   300.3
          3   400.4
          4   500.5
          >>> df.inflate_currency(
          ...    column_name='profit',
          ...    country='USA',
          ...    currency_year=2015,
          ...    to_year=2018,
          ...    make_new_column=True
          ... )
             profit  profit_2018
          0   100.1   106.050596
          1   200.2   212.101191
          2   300.3   318.151787
          3   400.4   424.202382
          4   500.5   530.252978
  
      Args:
          df: A pandas DataFrame.
          column_name: Name of the column containing monetary
              values to inflate.
          country: The country associated with the currency being inflated.
              May be any economy or code from the World Bank
              [List of economies](https://databank.worldbank.org/data/download/site-content/CLASS.xls).
          currency_year: The currency year to inflate from.
              The year should be 1960 or later.
          to_year: The currency year to inflate to.
              The year should be 1960 or later.
          make_new_column: Generates new column for inflated currency if
              True, otherwise, inflates currency in place.
  
      Returns:
          The DataFrame with inflated currency column.
      """  # noqa: E501
  
      inflator = _inflate_currency(country, currency_year, to_year)
  
      if make_new_column:
          new_column_name = column_name + "_" + str(to_year)
          df[new_column_name] = df[column_name] * inflator
  
      else:
          df[column_name] = df[column_name] * inflator
  
      return df
  
file_path: pyjanitor/janitor/finance.py
imports: import json
  from datetime import date
  from functools import lru_cache
  from typing import Optional
  import pandas
  import pandas_flavor
  import requests
  from janitor.errors import JanitorError
  from .utils import check, deprecated_alias, is_connected
label_desc: Use image node_id 6 for calling a global function with example usage: inflate_currency(df, column_name, country, currency_year, to_year, make_new_column) and returns: df