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

Bug: When parsing just one month/year, app breaks #3

Closed
blalop opened this issue Aug 6, 2022 · 0 comments
Closed

Bug: When parsing just one month/year, app breaks #3

blalop opened this issue Aug 6, 2022 · 0 comments
Assignees

Comments

@blalop
Copy link
Owner

blalop commented Aug 6, 2022

Because we try to concatenate just a float with the whole dataframe:

  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/blalop/Documentos/Dev/my-year-in-bbva/yearinbbva/__main__.py", line 5, in <module>
    from app import app
  File "/home/blalop/Documentos/Dev/my-year-in-bbva/yearinbbva/app.py", line 23, in <module>
    dcc.Graph(id="by-year", figure=px.bar(operations.group_by_year)),
  File "/home/blalop/Documentos/Dev/my-year-in-bbva/yearinbbva/operations.py", line 77, in group_by_year
    return self._concat_groups(_group_amount_by_year)
  File "/home/blalop/Documentos/Dev/my-year-in-bbva/yearinbbva/operations.py", line 65, in _concat_groups
    return pd.concat(
  File "/home/blalop/.local/lib/python3.10/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
  File "/home/blalop/.local/lib/python3.10/site-packages/pandas/core/reshape/concat.py", line 346, in concat
    op = _Concatenator(
  File "/home/blalop/.local/lib/python3.10/site-packages/pandas/core/reshape/concat.py", line 436, in __init__
    raise TypeError(msg)
TypeError: cannot concatenate object of type '<class 'numpy.float64'>'; only Series and DataFrame objs are valid
@blalop blalop self-assigned this Aug 6, 2022
blalop added a commit that referenced this issue Aug 6, 2022
blalop added a commit that referenced this issue Aug 6, 2022
#3 return always a pandas Series
@blalop blalop closed this as completed Aug 6, 2022
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