@@ -1400,13 +1400,15 @@ def test_expr_with_column_name_with_backtick(self):
1400
1400
expected = df [df ["a`b" ] < 2 ]
1401
1401
tm .assert_frame_equal (result , expected )
1402
1402
1403
+ @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
1403
1404
def test_expr_with_string_with_backticks (self ):
1404
1405
# GH 59285
1405
1406
df = DataFrame (("`" , "`````" , "``````````" ), columns = ["#backticks" ])
1406
1407
result = df .query ("'```' < `#backticks`" )
1407
1408
expected = df ["```" < df ["#backticks" ]]
1408
1409
tm .assert_frame_equal (result , expected )
1409
1410
1411
+ @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
1410
1412
def test_expr_with_string_with_backticked_substring_same_as_column_name (self ):
1411
1413
# GH 59285
1412
1414
df = DataFrame (("`" , "`````" , "``````````" ), columns = ["#backticks" ])
@@ -1437,6 +1439,7 @@ def test_expr_with_column_names_with_special_characters(self, col1, col2, expr):
1437
1439
expected = df [df [col1 ] < df [col2 ]]
1438
1440
tm .assert_frame_equal (result , expected )
1439
1441
1442
+ @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
1440
1443
def test_expr_with_no_backticks (self ):
1441
1444
# GH 59285
1442
1445
df = DataFrame (("aaa" , "vvv" , "zzz" ), columns = ["column_name" ])
@@ -1480,13 +1483,15 @@ def test_expr_with_quote_opened_before_backtick_and_quote_is_unmatched(self):
1480
1483
):
1481
1484
df .query ("`column-name` < 'It`s that\\ 's \" quote\" #hash" )
1482
1485
1486
+ @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
1483
1487
def test_expr_with_quote_opened_before_backtick_and_quote_is_matched_at_end (self ):
1484
1488
# GH 59285
1485
1489
df = DataFrame (("aaa" , "vvv" , "zzz" ), columns = ["column-name" ])
1486
1490
result = df .query ("`column-name` < 'It`s that\\ 's \" quote\" #hash'" )
1487
1491
expected = df [df ["column-name" ] < 'It`s that\' s "quote" #hash' ]
1488
1492
tm .assert_frame_equal (result , expected )
1489
1493
1494
+ @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
1490
1495
def test_expr_with_quote_opened_before_backtick_and_quote_is_matched_in_mid (self ):
1491
1496
# GH 59285
1492
1497
df = DataFrame (("aaa" , "vvv" , "zzz" ), columns = ["column-name" ])
0 commit comments