Skip to content

Series __repr__ Exception when series hold DataFrames #1749

@lodagro

Description

@lodagro

from stackoverflow

In [67]: s = pandas.Series([pandas.DataFrame(np.random.randn(2,2)) for i in range(5)])

In [68]: s
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Exception ValueError: ValueError('Cannot call bool() on DataFrame.',) in 'util._checknull' ignored
Out[68]:
0              0         1
0  1.821894 -1.268104
1  0.
1              0         1
0 -1.361116  0.809527
1 -0.
2              0         1
0  0.603496  0.034081
1 -0.
3              0         1
0 -0.274753 -0.544456
1  0.
4              0         1
0 -0.699664  0.366191
1 -0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions