COMPAT: extension dtypes (DatetimeTZ, Categorical) are now Singleton cached objects by jreback · Pull Request #13285 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation1 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jreback

allows for proper is / == comparisons
Had this odd semantic difference as these were really different objects (though they DID hash the same)
This doesn't actually affect any user code.

In [1]: from pandas.core import common as com

In [2]: t1 = com.DatetimeTZDtype('datetime64[ns, US/Eastern]')

In [3]: t2 = com.DatetimeTZDtype('datetime64[ns, US/Eastern]')

In [4]: t1 == t2
Out[4]: True

In [5]: t1 is t2
Out[5]: False

In [6]: hash(t1)
Out[6]: 5756291921003024619

In [7]: hash(t2)
Out[7]: 5756291921003024619

@jreback jreback added Bug Compat

pandas objects compatability with Numpy or Python functions

labels

May 25, 2016

@jreback

…cached objects

allows for proper is / == comparisons

@codecov-io

Current coverage is 84.20%

Merging #13285 into master will increase coverage by <.01%

@@ master #13285 diff @@

Files 138 138
Lines 50591 50607 +16
Methods 0 0
Messages 0 0
Branches 0 0

Powered by Codecov. Last updated by 8749273...fd09c61

Labels

Bug Compat

pandas objects compatability with Numpy or Python functions

2 participants

@jreback @codecov-io