Skip to content

Commit 67a44c5

Browse files
committed
Use 'pandas_query' parser by default for queries
1 parent 3fe7951 commit 67a44c5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pandas/core/frame.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,7 @@ def query(self, expr, **kwargs):
19351935
>>> df[df.a > df.b] # same result as the previous expression
19361936
"""
19371937
kwargs['level'] = kwargs.pop('level', 0) + 1
1938+
kwargs['parser'] = kwargs.pop('parser', 'pandas_query')
19381939
res = self.eval(expr, **kwargs)
19391940

19401941
try:

pandas/tests/test_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15210,7 +15210,7 @@ class TestDataFrameQueryPythonPandas(TestDataFrameQueryNumExprPandas):
1521015210
def setUpClass(cls):
1521115211
super(TestDataFrameQueryPythonPandas, cls).setUpClass()
1521215212
cls.engine = 'python'
15213-
cls.parser = 'pandas'
15213+
cls.parser = 'pandas_query'
1521415214
cls.frame = _frame.copy()
1521515215

1521615216
def test_query_builtin(self):

0 commit comments

Comments
 (0)