Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Pandas trips over NaN values #195

Open
DrMurx opened this issue Jan 6, 2023 · 2 comments
Open

Pandas trips over NaN values #195

DrMurx opened this issue Jan 6, 2023 · 2 comments

Comments

@DrMurx
Copy link

DrMurx commented Jan 6, 2023

I've some series returning some NaN values which the pandas component can't process.

Seen on the latest docker image (SHA 7d8f3511ccd0)

 Traceback (most recent call last):
   File "/usr/lib64/python3.8/multiprocessing/pool.py", line 125, in worker
     result = (True, func(*args, **kwds))
   File "/usr/lib64/python3.8/multiprocessing/pool.py", line 48, in mapstar
     return list(map(*args))
   File "app.py", line 146, in train_individual_model
     predictor_model.train(
   File "/opt/app-root/src/model.py", line 31, in train
     self.metric += Metric(metric_data)
   File "/opt/app-root/lib64/python3.8/site-packages/prometheus_api_client/metric.py", line 72, in __init__
     self.metric_values = pandas.DataFrame(metric["values"], columns=["ds", "y"]).apply(
   File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/frame.py", line 8736, in apply
     return op.apply()
   File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 688, in apply
     return self.apply_standard()
   File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 805, in apply_standard
     results, res_index = self.apply_series_generator()
   File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 821, in apply_series_generator
     results[i] = self.f(v)
   File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 131, in f
     return func(x, *args, **kwargs)
   File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/tools/numeric.py", line 183, in to_numeric
     values, _ = lib.maybe_convert_numeric(
   File "pandas/_libs/lib.pyx", line 2347, in pandas._libs.lib.maybe_convert_numeric
 ValueError: Unable to parse string "NaN" at position 85489
@vsheykin
Copy link

Hi. I've got this error too.

Traceback (most recent call last):
File "/usr/lib64/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib64/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "app.py", line 146, in train_individual_model
predictor_model.train(
File "/opt/app-root/src/model.py", line 31, in train
self.metric += Metric(metric_data)
File "/opt/app-root/lib64/python3.8/site-packages/prometheus_api_client/metric.py", line 72, in init
self.metric_values = pandas.DataFrame(metric["values"], columns=["ds", "y"]).apply(
File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/frame.py", line 8736, in apply
return op.apply()
File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 688, in apply
return self.apply_standard()
File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 805, in apply_standard
results, res_index = self.apply_series_generator()
File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 821, in apply_series_generator
results[i] = self.f(v)
File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/apply.py", line 131, in f
return func(x, *args, **kwargs)
File "/opt/app-root/lib64/python3.8/site-packages/pandas/core/tools/numeric.py", line 183, in to_numeric
values, _ = lib.maybe_convert_numeric(
File "pandas/_libs/lib.pyx", line 2347, in pandas._libs.lib.maybe_convert_numeric
ValueError: Unable to parse string "NaN" at position 156
"""

@sesheta
Copy link

sesheta commented Apr 16, 2023

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants