File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -4524,7 +4524,7 @@ def query(
4524
4524
self ,
4525
4525
expr : str ,
4526
4526
* ,
4527
- parser : Literal ["pandas" , "python" ] = ... ,
4527
+ parser : Literal ["pandas" , "python" ] = "pandas" ,
4528
4528
engine : Literal ["python" , "numexpr" ] | None = None ,
4529
4529
local_dict : dict [str , Any ] | None = None ,
4530
4530
global_dict : dict [str , Any ] | None = None ,
@@ -4669,16 +4669,17 @@ def query(
4669
4669
msg = f"expr must be a string to be evaluated, { type (expr )} given"
4670
4670
raise ValueError (msg )
4671
4671
4672
- res = self .eval (
4673
- expr ,
4674
- parser ,
4675
- engine ,
4676
- local_dict ,
4677
- global_dict ,
4678
- resolvers ,
4679
- level + 1 ,
4680
- target ,
4681
- )
4672
+ kwargs = {
4673
+ "parser" : parser ,
4674
+ "engine" : engine ,
4675
+ "local_dict" : local_dict ,
4676
+ "global_dict" : global_dict ,
4677
+ "resolvers" : resolvers ,
4678
+ "level" : level + 1 ,
4679
+ "target" : None ,
4680
+ }
4681
+
4682
+ res = self .eval (expr , ** kwargs )
4682
4683
4683
4684
try :
4684
4685
result = self .loc [res ]
You can’t perform that action at this time.
0 commit comments