Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't decode columns with thousands separators #8

Open
philtweir opened this issue Apr 20, 2020 · 0 comments
Open

Can't decode columns with thousands separators #8

philtweir opened this issue Apr 20, 2020 · 0 comments

Comments

@philtweir
Copy link
Collaborator

When a column has thousands separators (which should be internationalized), moneypandas is unable to parse:

could not convert string to float: '27,042.58 '
...
  File "/home/user/function/processor.py", line 253, in find_special_columns
    data[col] = MoneyArray(data[col], default_money_code=cur)

  File "/home/user/.local/lib/python3.8/site-packages/moneypandas/money_array.py", line 84, in __init__
    values, self.default_money_code = _to_money_array(values, default_money_code=default_money_code)  # TODO: avoid potential copy

  File "/home/user/.local/lib/python3.8/site-packages/moneypandas/parser.py", line 50, in _to_money_array
    values = [_as_money_object(v, default_money_code) for v in values]

  File "/home/user/.local/lib/python3.8/site-packages/moneypandas/parser.py", line 50, in <listcomp>
    values = [_as_money_object(v, default_money_code) for v in values]

  File "/home/user/.local/lib/python3.8/site-packages/moneypandas/parser.py", line 91, in _as_money_object
    va = np.float64(val)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant