Skip to content

ix setting with enlargement results in stale caches. #4939

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
dalejung opened this issue Sep 22, 2013 · 2 comments · Fixed by #4942
Closed

ix setting with enlargement results in stale caches. #4939

dalejung opened this issue Sep 22, 2013 · 2 comments · Fixed by #4942
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@dalejung
Copy link
Contributor

When doing setting with enlargement like:

import pandas as pd
panel = pd.util.testing.makePanel()
pd.ix[0] # get first item into cache
panel.ix[:, :, 'A+1'] = panel.ix[:, :, 'A'] + 1
assert "A+1" in panel.ix[0].columns # fails due to stale item cache
assert "A+1" in panel.ix[1].columns # succeeds

The same thing happens with DataFrames.

df = pd.util.testing.makeDataFrame()
df['A'] # cache series
df.ix["Hello Friend"] = df.ix[0]
assert "Hello Friend" in df['A'].index # fails
assert "Hello Friend" in df['B'].index # success
@jreback
Copy link
Contributor

jreback commented Sep 22, 2013

yep...need to update the cache ref....easy (thought I had done this....)

@jreback
Copy link
Contributor

jreback commented Sep 23, 2013

thanks for the report! you find all the esoteric bugs! keep em comin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants