Skip to content

ER: better error messages on Panel construction with non-nested dict #4185

Closed
@jreback

Description

@jreback

see related: #4184, #4324

In [2]: pd.Panel(dict(A = np.nan))
AttributeError: 'float' object has no attribute 'shape'
In [26]: a = pd.Series(np.random.randn(4))

In [27]: b = pd.Series(np.random.randn(4), index=np.arange(1, 5))

In [28]: pd.Panel({'a': a, 'b': b})
IndexError: tuple index out of range

Metadata

Metadata

Assignees

Labels

Error ReportingIncorrect or improved errors from pandas

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions