pydata/pandas — pull request #2075 by jreback (2012-10-16 02:42:36+00:00)
Title: a panel constructed with a None value throws an error (0.9 exhibits the ...

...same behavior)

Python 2.7.3 (default, Jun 21 2012, 07:50:29)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> print pandas.__version__
0.8.1
>>> print pandas.Panel(dict(a = None, b = pandas.DataFrame(index=[1,2,3],columns=[1,2,3])))
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/panel.py", line 219, in __init__
mgr = self._init_dict(data, passed_axes, dtype=dtype)
File "/usr/local/lib/python2.7/site-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/panel.py", line 256, in _init_dict
major = _extract_axis(data, axis=0)
File "/usr/local/lib/python2.7/site-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/panel.py", line 1396, in _extract_axis
raw_lengths.append(v.shape[axis])
AttributeError: 'NoneType' object has no attribute 'shape'

added tests and fixes for this case (and the pathological case of constructing with dict(a=None))