code: def _currency_column_to_numeric(
      x: str,
      cast_non_numeric: Optional[dict] = None,
  ) -> Union[int, float, str]:
      """
      Perform logic for changing cell values.
  
      This is a private function intended to be used only in
      `currency_column_to_numeric`.
  
      It is intended to be used in a pandas `apply` method, after being passed
      through `partial`.
  
      Args:
          x: A string representing currency.
          cast_non_numeric: A dict of how to coerce certain strings to numeric
              type. For example, if there are values of 'REORDER' in the
              DataFrame, `{'REORDER': 0}` will cast all instances of 'REORDER'
              to 0.
      """
      acceptable_currency_characters = {
          "-",
          ".",
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "0",
      }
      if not x:
          return "ORIGINAL_NA"
  
      if cast_non_numeric:
          if x in cast_non_numeric:
              mapped_x = cast_non_numeric[x]
              check(
                  "{%r: %r}" % (x, str(mapped_x)),
                  mapped_x,
                  [int, float],
              )
              return mapped_x
      return "".join(
          i for i in x if i in acceptable_currency_characters
      )
  
file_path: pyjanitor/janitor/functions/currency_column_to_numeric.py
imports: from functools import partial
  from typing import Optional, Union
  import pandas
  import pandas_flavor
  from janitor.utils import check, check_column, deprecated_alias
label_desc: Use image node_id 2 for calling a global function with example usage: _currency_column_to_numeric(x, cast_non_numeric) and returns: str, str, mapped_x