blaze / blaze/odo

Converting iterable to DataFrame results in AttributeError: NoneType has no attribute `measure`

Open
#442 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

Passing in a non-list / tuple iterable to convert to DataFrame raises an `AttributeError: 'NoneType' object has no attribute 'measure'`

Simple code to reproduce:

``` python
>>> import odo
>>> import itertools
>>> import pandas as pd
>>> chained_data = itertools.chain([(1, 'Alice', 100), (2, 'Bob', -100)], [(3, 'Charlie', 200), (4, 'David', 75)])
>>> odo.odo(chained_data, pd.DataFrame)
```

Passing in an explicit `dshape` argument sidesteps the problem.

Related to #355 , although not sure if it's the same issue.

Note that I'd probably be just fine if I got a more explicit error, e.g. "Cannot determine shape of `itertools.chain`"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.