Skip to content

compat pickles don't have '_id' #8431

Closed
@dalejung

Description

@dalejung

So I'm running into an issue with creating a Panel out of legacy DataFrame pickles. The issue is that _id is set to None and the current Index.is_ logic treats any two Indexes with unset _id as the same.

I thought the issue was with the unpickling. But it looks like there was an attempt to address this

def is_(self, other):
    return self._id is getattr(other, '_id', Ellipsis)

I'm guessing whoever thought that getattr(other, '_id', Ellipsis) would return Ellipsis if the _id was not set.

So I'm seeing:

  1. Make unpickling make a new _id if it's not found in state
  2. Make any Index.is_ always return False if either one has an unset id.

Maybe both?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Compatpandas objects compatability with Numpy or Python functions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions