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

pd.save/load does not recreate some dataframe attributes #2431

Closed
y-p opened this Issue Dec 5, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@y-p
Contributor

y-p commented Dec 5, 2012

Ran into this while trying some dropna and merge type operations
on a pickled data frame I loaded back i, It died with an AttributeError
on self._known_consolidated.

df = pd.DataFrame( [[1,2]])
df.save("/tmp/1.pickle")
print df._data._known_consolidated
df2=df.load("/tmp/1.pickle")
print df2._data._known_consolidated

looking at internals.BLockManager.__setstate__ and __getstate__ Here, those
attributes are not saved off.
a quick fix would be to just init to false on load, But is there a legacy reason
why getstate drops everything beyond the 3rd arg or can that be extended?
is there a versioning mechanism?

@wesm

This comment has been minimized.

Show comment
Hide comment
@wesm

wesm Dec 5, 2012

Member

Ah. That should just be initialized to False in __setstate__. Can you add a test case?

Member

wesm commented Dec 5, 2012

Ah. That should just be initialized to False in __setstate__. Can you add a test case?

@y-p

This comment has been minimized.

Show comment
Hide comment
@y-p

y-p Dec 5, 2012

Contributor

closed via 0b6b472

Contributor

y-p commented Dec 5, 2012

closed via 0b6b472

@y-p y-p closed this Dec 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment