Test failure
- Dominant language
- Python
- Stars
- 1k
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
```
=================================== FAILURES ===================================
___________________ test_numpy_asserts_type_after_dataframe ____________________
def test_numpy_asserts_type_after_dataframe():
df = pd.DataFrame({'name': ['Alice'], 'amount': [100]})
ds = datashape.dshape('1 * {name: string[10, "ascii"], amount: int32}')
> x = convert(np.ndarray, df, dshape=ds)
odo/tests/test_convert.py:169:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
odo/core.py:44: in __call__
return _transform(self.graph, *args, **kwargs)
odo/core.py:60: in _transform
x = f(x, excluded_edges=excluded_edges, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
df = amount name
0 100 Alice
dshape = dshape("1 * {name: string[10, 'A'], amount: int32}")
kwargs = {'excluded_edges': set()}
dtype = dtype([('name', 'S10'), ('amount', ' x = x.astype(dtype)
E ValueError: invalid literal for int() with base 10: 'Alice'
odo/convert.py:25: ValueError
===================== 1 failed, 84 passed in 2.12 seconds ======================
builder for '/nix/store/inpc9f06d29xnl71d2nxjjv2ybjgxwz8-python3.6-odo-0.5.1.drv' failed with exit code 1
error: build of '/nix/store/inpc9f06d29xnl71d2nxjjv2ybjgxwz8-python3.6-odo-0.5.1.drv' failed
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Run odo/tests/test_convert.py and begin with test_numpy_asserts_type_after_dataframe, then inspect the dataframe_to_numpy entry point in odo/convert.py and the traceback. Determine the intended conversion behavior for this DataFrame and dshape, and consider the issue done when the failing test passes without breaking the remaining conversion tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, pandas, python
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100