Skip to content

Commit

Permalink
remove _clean_accounting_column
Browse files Browse the repository at this point in the history
  • Loading branch information
samukweku committed Sep 27, 2023
1 parent 66c1a85 commit cd04309
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
23 changes: 0 additions & 23 deletions janitor/functions/currency_column_to_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,29 +136,6 @@ def currency_column_to_numeric(
return df


def _clean_accounting_column(x: str) -> float:
"""Perform the logic for the "accounting" cleaning style.
This is a private function, not intended to be used outside of
`currency_column_to_numeric``.
It is intended to be used in a pandas `apply` method.
Args:
x: A string representing currency.
Returns:
A float representing currency.
"""
y = x.strip()
y = y.replace(",", "")
y = y.replace(")", "")
y = y.replace("(", "-")
if y == "-":
return 0.00
return float(y)


def _currency_column_to_numeric(
x: str,
cast_non_numeric: Optional[dict] = None,
Expand Down
17 changes: 0 additions & 17 deletions tests/utils/test_clean_accounting_column.py

This file was deleted.

0 comments on commit cd04309

Please sign in to comment.