@@ -12,36 +12,29 @@ def test_tuple_setitem_with_datetime_tz(self):
12
12
# 16889
13
13
# support setitem with datetimeindex with tz
14
14
mask = np .array ([True , False , True , False ])
15
+
15
16
idx = pd .date_range ('20010101' , periods = 4 , tz = 'UTC' )
16
17
df = pd .DataFrame ({'a' : np .arange (4 )}, index = idx ).astype ('float64' )
18
+
17
19
result = df .copy ()
18
20
result .loc [mask , :] = df .loc [mask , :]
19
21
tm .assert_frame_equal (result , df )
20
22
21
- def test_setitem_with_datetime_tz (self ):
22
- mask = np .array ([True , False , True , False ])
23
- idx = pd .date_range ('20010101' , periods = 4 , tz = 'UTC' )
24
- df = pd .DataFrame ({'a' : np .arange (4 )}, index = idx ).astype ('float64' )
25
23
result = df .copy ()
26
24
result .loc [mask ] = df .loc [mask ]
27
25
tm .assert_frame_equal (result , df )
28
26
29
- def test_tuple_setitem_with_datetime (self ):
30
- mask = np .array ([True , False , True , False ])
31
27
idx = pd .date_range ('20010101' , periods = 4 )
32
28
df = pd .DataFrame ({'a' : np .arange (4 )}, index = idx ).astype ('float64' )
29
+
33
30
result = df .copy ()
34
- result .loc [mask ] = df .loc [mask ]
31
+ result .loc [mask , : ] = df .loc [mask , : ]
35
32
tm .assert_frame_equal (result , df )
36
-
37
- def test_setitem_datetime (self ):
38
- mask = np .array ([True , False , True , False ])
39
- idx = pd .date_range ('20010101' , periods = 4 )
40
- df = pd .DataFrame ({'a' : np .arange (4 )}, index = idx ).astype ('float64' )
33
+
41
34
result = df .copy ()
42
35
result .loc [mask ] = df .loc [mask ]
43
36
tm .assert_frame_equal (result , df )
44
-
37
+
45
38
def test_indexing_with_datetime_tz (self ):
46
39
47
40
# 8260
0 commit comments