Skip to content
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

API/BUG: Categorical.is_dtype_equal doesn't compare to Series #16659

Closed
chris-b1 opened this issue Jun 10, 2017 · 3 comments · Fixed by #19045
Closed

API/BUG: Categorical.is_dtype_equal doesn't compare to Series #16659

chris-b1 opened this issue Jun 10, 2017 · 3 comments · Fixed by #19045
Labels
Bug Categorical Categorical Data Type
Milestone

Comments

@chris-b1
Copy link
Contributor

xref #16639

In [25]: c1 = pd.Categorical(['a', 'b'])

In [26]: c2 = pd.Categorical(['a', 'b'])

In [27]: s = pd.Series(c1)

In [29]: c1.is_dtype_equal(c2)
Out[29]: True

In [30]: c1.is_dtype_equal(s)
Out[30]: False

I think [30] should be true?

@jreback
Copy link
Contributor

jreback commented Jun 10, 2017

yep [30] should be True.

@jreback jreback added this to the Next Major Release milestone Jun 10, 2017
funnycrab added a commit to funnycrab/pandas that referenced this issue Jun 11, 2017
funnycrab added a commit to funnycrab/pandas that referenced this issue Jul 22, 2017
funnycrab added a commit to funnycrab/pandas that referenced this issue Sep 25, 2017
funnycrab added a commit to funnycrab/pandas that referenced this issue Nov 12, 2017
@jschendel
Copy link
Member

Looks like this is fixed in 0.22.0 (so really probably fixed in 0.21.x):

In [2]: pd.__version__
Out[2]: '0.22.0'

In [3]: c1 = pd.Categorical(['a', 'b'])

In [4]: c2 = pd.Categorical(['a', 'b'])

In [5]: s = pd.Series(c1)

In [6]: c1.is_dtype_equal(c2)
Out[6]: True

In [7]: c1.is_dtype_equal(s)
Out[7]: True

Could still use a test to prevent regression though.

@jreback
Copy link
Contributor

jreback commented Jan 2, 2018

if u can put up a test would be great

@jreback jreback modified the milestones: Next Major Release, 0.23.0 Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Categorical Categorical Data Type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants