File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -2240,6 +2240,7 @@ class DatetimeTZBlock(ExtensionBlock, DatetimeBlock):
22402240 to_native_types = DatetimeBlock .to_native_types
22412241 fill_value = np .datetime64 ("NaT" , "ns" )
22422242 should_store = DatetimeBlock .should_store
2243+ _slice = ExtensionBlock ._slice
22432244
22442245 @property
22452246 def _holder (self ):
@@ -2307,15 +2308,6 @@ def get_values(self, dtype=None):
23072308 values = values .reshape (1 , - 1 )
23082309 return values
23092310
2310- def _slice (self , slicer ):
2311- """ return a slice of my values """
2312- if isinstance (slicer , tuple ):
2313- col , loc = slicer
2314- if not com .is_null_slice (col ) and col != 0 :
2315- raise IndexError (f"{ self } only contains one item" )
2316- return self .values [loc ]
2317- return self .values [slicer ]
2318-
23192311 def diff (self , n : int , axis : int = 0 ) -> List ["Block" ]:
23202312 """
23212313 1st discrete difference.
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ def test_iloc_frame(self, data):
4040 result = df .iloc [:4 , 0 ]
4141 self .assert_series_equal (result , expected )
4242
43- # GH#32957 null slice along index, slice along rows
44- result = df .iloc [:, :1 ]
43+ # GH#32957 null slice along index, slice along columns with single-block
44+ result = df [[ "A" ]] .iloc [:, :1 ]
4545 self .assert_frame_equal (result , df [["A" ]])
4646
4747 def test_loc_series (self , data ):
You can’t perform that action at this time.
0 commit comments