The error message is too big to put here but here’s the last part of it:
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/nanops.py”, line 1696, in _ensure_numeric
x = complex(x)
ValueError: complex() arg is a malformed string
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 563, in _run_script
exec(code, module.dict)
File “/app/floridagolf/main.py”, line 169, in
ecc_duration_by_name = df_selection.groupby(by=[“Date”]).mean()[["Eccentric Duration [ms] “]]
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py”, line 1855, in mean
result = self._cython_agg_general(
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py”, line 1507, in _cython_agg_general
new_mgr = data.grouped_reduce(array_func)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/internals/managers.py”, line 1503, in grouped_reduce
applied = sb.apply(func)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/internals/blocks.py”, line 329, in apply
result = func(self.values, **kwargs)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py”, line 1503, in array_func
result = self._agg_py_fallback(values, ndim=data.ndim, alt=alt)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py”, line 1457, in _agg_py_fallback
res_values = self.grouper.agg_series(ser, alt, preserve_dtype=True)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/ops.py”, line 994, in agg_series
result = self._aggregate_series_pure_python(obj, func)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/ops.py”, line 1015, in _aggregate_series_pure_python
res = func(group)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py”, line 1857, in
alt=lambda x: Series(x).mean(numeric_only=numeric_only),
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/generic.py”, line 11556, in mean
return NDFrame.mean(self, axis, skipna, numeric_only, **kwargs)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/generic.py”, line 11201, in mean
return self._stat_function(
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/generic.py”, line 11158, in _stat_function
return self._reduce(
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/series.py”, line 4670, in _reduce
return op(delegate, skipna=skipna, **kwds)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/nanops.py”, line 96, in _f
return f(*args, **kwargs)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/nanops.py”, line 158, in f
result = alt(values, axis=axis, skipna=skipna, **kwds)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/nanops.py”, line 421, in new_func
result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs)
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/nanops.py”, line 727, in nanmean
the_sum = _ensure_numeric(values.sum(axis, dtype=dtype_sum))
File “/home/appuser/venv/lib/python3.9/site-packages/pandas/core/nanops.py”, line 1699, in _ensure_numeric
raise TypeError(f"Could not convert {x} to numeric”) from err
TypeError: Could not convert Luke PoulterTyler WilkesMatthew KressRyan HartMiguel Leal to numeric