Skip to content

BUG: infinite loop when column index includes periodindex and string #4225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnpapp opened this issue Jul 12, 2013 · 1 comment
Closed
Labels
Duplicate Report Duplicate issue or pull request

Comments

@johnpapp
Copy link

the following code creates an infinite loop in python:

import pandas as pd
cols = [pd.Period('1998', 'A-DEC'), pd.Period('1999', 'A-DEC'), 'test']
df = pd.DataFrame(np.random.randn(10, 3), columns=cols)
df[[pd.Period('1998'), pd.Period('1999')]]

It appears to be because Index.get_indexer changes the index from an int type to an object and recalls get_indexer which then changes it back to an object.

@jreback
Copy link
Contributor

jreback commented Jul 13, 2013

dup of #3612, thanks for the report

@jreback jreback closed this as completed Jul 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants