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

Fix: Add compat code for pd.Categorical in pandas>=0.15 #1884

Merged
merged 1 commit into from Aug 14, 2014

Conversation

Projects
None yet
3 participants
@jankatins
Copy link
Contributor

commented Aug 14, 2014

No description provided.

@coveralls

This comment has been minimized.

Copy link

commented Aug 14, 2014

Coverage Status

Coverage increased (+0.0%) when pulling 83be7a5 on JanSchulz:cat_fixes into 20c59d2 on statsmodels:master.

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Aug 14, 2014

Thanks @JanSchulz

Merging, looks good from what I understand.

result should be visible on pythonxy Ubuntu testing
I don't find a related issue that should be closed

josef-pkt added a commit that referenced this pull request Aug 14, 2014

Merge pull request #1884 from JanSchulz/cat_fixes
BUG: Add compat code for pd.Categorical in pandas>=0.15

@josef-pkt josef-pkt merged commit 53dccdd into statsmodels:master Aug 14, 2014

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci The Travis CI build passed
Details
@josef-pkt

This comment has been minimized.

Copy link
Member

commented Aug 15, 2014

didn't work, still raises error

https://launchpadlibrarian.net/182311320/buildlog_ubuntu-utopic-i386.statsmodels_0.6.0~ppa18~revno-1690~ubuntu14.10.1_UPLOADING.txt.gz

======================================================================
ERROR: statsmodels.tools.tests.test_grouputils.TestIndexGrouping.test_count_categories
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd/statsmodels-0.6.0~ppa18~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/tools/tests/test_grouputils.py", line 16, in test_count_categories
    self.grouping.count_categories(level=0)
  File "/build/buildd/statsmodels-0.6.0~ppa18~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/tools/grouputils.py", line 415, in count_categories
    self.counts = np.bincount(self.labels[level])
  File "/build/buildd/statsmodels-0.6.0~ppa18~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/tools/grouputils.py", line 377, in labels
    return getattr(tmp, "codes", tmp.labels)[None]
AttributeError: 'Categorical' object has no attribute 'labels'

@josef-pkt josef-pkt removed the PR label Aug 24, 2014

PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this pull request Sep 2, 2014

Merge pull request statsmodels#1884 from JanSchulz/cat_fixes
BUG: Add compat code for pd.Categorical in pandas>=0.15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.