Referencing a panel with an object causes an inf loop in 0.15.2 · Issue #9140 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@echu79

Description

@echu79

The snippet of code works fine in 0.15.0. Not sure about 0.15.1 as I did not try it on that version. However on 0.15.2 it causes an infinite loop

import pandas
import numpy

class TestObject:
        def __str__(self):
                return "TestObject"

obj = TestObject()

wp = pandas.Panel(numpy.random.randn(1,5,4), items=[obj],
        major_axis = pandas.date_range('1/1/2000', periods=5),
        minor_axis=['A', 'B', 'C', 'D'])


print(wp)

print(wp[obj])