Skip to content

Commit

Permalink
ERR: correctly raise ValueError on empty input to pd.eval() and df.qu…
Browse files Browse the repository at this point in the history
…ery() (#13139)
  • Loading branch information
tserafim committed Oct 24, 2016
1 parent 9a5c55f commit 77483dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.19.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Bug Fixes

- Bug in ``pd.pivot_table`` may raise ``TypeError`` or ``ValueError`` when ``index`` or ``columns``
is not scalar and ``values`` is not specified (:issue:`14380`)
- pd.eval('') and df.query('') now show better error message and raise ``ValueError`` (:issue: `13139`)
- corrrecly raise ``ValueError`` on empty input to pd.eval() and df.query() (:issue: `13139`)
1 change: 1 addition & 0 deletions pandas/computation/tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,7 @@ def test_bad_resolver_raises():


def check_empty_string_raises(engine, parser):
# GH 13139
tm.skip_if_no_ne(engine)
with tm.assertRaisesRegexp(ValueError, 'expr cannot be an empty string'):
pd.eval('', engine=engine, parser=parser)
Expand Down

0 comments on commit 77483dd

Please sign in to comment.