Tests fail with latest Pandas (0.15.2)

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
pandas, python
Domain
data, testing-qa

Research direction

Start by running nosetests with NumPy 1.9.1, Pandas 0.15.2, and Patsy 0.3.0, then inspect the failures in patsy/test_highlevel.py, especially test_formula_likes and test_return_pandas. Done means the affected tests pass without losing their expected design-info column names or DataFrame columns.

Written by the indexing model from the issue text.

Description

With NumPy 1.9.1, Pandas 0.15.2, and Patsy 0.3.0:

$ nosetests
............./usr/local/lib/python2.7/dist-packages/pandas-0.15.2_182_gbb9c311-py2.7-linux-x86_64.egg/pandas/core/c
ategorical.py:462: FutureWarning: Accessing 'levels' is deprecated, use 'categories'
  warn("Accessing 'levels' is deprecated, use 'categories'", FutureWarning)
/usr/local/lib/python2.7/dist-packages/pandas-0.15.2_182_gbb9c311-py2.7-linux-x86_64.egg/pandas/core/categorical.py
:414: FutureWarning: 'labels' is deprecated. Use 'codes' instead
  warnings.warn("'labels' is deprecated. Use 'codes' instead", FutureWarning)
...FF.................
======================================================================
FAIL: patsy.test_highlevel.test_formula_likes
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/whelchel/patsy-0.3.0/patsy/test_highlevel.py", line 202, in test_formula_likes
    [[1], [2], [3]], ["x"])
  File "/home/whelchel/patsy-0.3.0/patsy/test_highlevel.py", line 104, in t
    expected_lhs_values, expected_lhs_names)
  File "/home/whelchel/patsy-0.3.0/patsy/test_highlevel.py", line 32, in check_result
    assert rhs.design_info.column_names == expected_rhs_names
AssertionError

======================================================================
FAIL: patsy.test_highlevel.test_return_pandas
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/whelchel/patsy-0.3.0/patsy/test_highlevel.py", line 348, in test_return_pandas
    assert np.array_equal(df4.columns, ["AA"])
AssertionError

----------------------------------------------------------------------
Ran 35 tests in 54.269s
FAILED (failures=2)
Dominant language
Python
Stars
990
Forks
113
Avg merge
2d 8h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pydata/patsy

All issues in pydata/patsy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.