File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 4
4
import pytest
5
5
6
6
import pandas ._testing as tm
7
+
8
+ from pandas import DataFrame
7
9
from pandas .core .ops .array_ops import (
8
10
comparison_op ,
9
11
na_logical_op ,
10
12
)
13
+ from pandas .core .computation .expressions import (
14
+ _evaluate_numexpr ,
15
+ _evaluate_standard ,
16
+ )
11
17
12
18
13
19
def test_na_logical_op_2d ():
@@ -37,3 +43,13 @@ def test_object_comparison_2d():
37
43
right .flags .writeable = False
38
44
result = comparison_op (left , right , operator .ne )
39
45
tm .assert_numpy_array_equal (result , ~ expected )
46
+
47
+
48
+ def test_str_comparison ():
49
+ a = np .array (range (10 ** 5 ))
50
+ right = DataFrame (a , dtype = np .int64 )
51
+ left = " "
52
+
53
+ result = right == left
54
+ expected = DataFrame (np .zeros (right .shape , dtype = bool ))
55
+ tm .assert_frame_equal (result , expected )
You can’t perform that action at this time.
0 commit comments