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

ERROR: test_constructor_unsortable (pandas.tests.test_categorical.TestCategorical) #11388

Closed
jlec opened this issue Oct 20, 2015 · 1 comment
Closed
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@jlec
Copy link
Contributor

jlec commented Oct 20, 2015

======================================================================
ERROR: test_constructor_unsortable (pandas.tests.test_categorical.TestCategorical)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/core/algorithms.py", line 198, in factorize
    sorter = uniques.argsort()
TypeError: unorderable types: datetime.datetime() > int()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/core/categorical.py", line 265, in __init__
    codes, categories = factorize(values, sort=True)
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/core/algorithms.py", line 207, in factorize
    lambda x: isinstance(x,string_types) ]
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/core/algorithms.py", line 206, in <listcomp>
    np.sort(np.array([ e for i, e in enumerate(uniques) if f(e) ],dtype=object)) for f in [ lambda x: not isinstance(x,string_types),
  File "/usr/lib64/python3.4/site-packages/numpy/core/fromnumeric.py", line 819, in sort
    a.sort(axis, kind, order)
TypeError: unorderable types: datetime.datetime() > int()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/tests/test_categorical.py", line 94, in test_constructor_unsortable
    Categorical.from_array(arr, ordered=True)
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/core/categorical.py", line 351, in from_array
    return Categorical(data, **kwargs)
  File "/var/tmp/portage/dev-python/pandas-0.17.0/work/pandas-0.17.0-python3_4/lib/pandas/core/categorical.py", line 271, in __init__
    raise TypeError("'values' is not ordered, please explicitly specify the "
TypeError: 'values' is not ordered, please explicitly specify the categories order by passing in a categories argument.

----------------------------------------------------------------------
Ran 9056 tests in 1000.617s
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.1.9-lh
machine: x86_64
processor: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
byteorder: little
LC_ALL: None
LANG: en_GB.utf8

pandas: 0.17.0
nose: 1.3.7
pip: 7.1.2
setuptools: 18.4
Cython: 0.23.4
numpy: 1.10.1
scipy: 0.16.0
statsmodels: 0.6.1
IPython: None
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.4.2
pytz: 2015.6
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.4
matplotlib: 1.4.3
openpyxl: 2.2.6
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.7.7
lxml: 3.4.4
bs4: 4.4.1
html5lib: 0.9999999
httplib2: 0.9.2
apiclient: None
sqlalchemy: 1.0.8
pymysql: 0.6.7.None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
@jreback jreback added the Testing pandas testing functions or related to the test suite label Oct 20, 2015
@jreback jreback added this to the 0.17.1 milestone Oct 27, 2015
@jreback
Copy link
Contributor

jreback commented Nov 13, 2015

closed by 2d38d6a

@jreback jreback closed this as completed Nov 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants