@@ -234,17 +234,16 @@ def _validate_get_window_bounds_signature(window: BaseIndexer) -> None:
234234 f"get_window_bounds"
235235 )
236236
237- def _create_blocks (self , obj : FrameOrSeriesUnion ) :
237+ def _create_data (self , obj : FrameOrSeries ) -> FrameOrSeries :
238238 """
239239 Split data into blocks & return conformed data.
240240 """
241241 # filter out the on from the object
242242 if self .on is not None and not isinstance (self .on , Index ):
243243 if obj .ndim == 2 :
244244 obj = obj .reindex (columns = obj .columns .difference ([self .on ]), copy = False )
245- blocks = obj ._to_dict_of_blocks (copy = False ).values ()
246245
247- return blocks , obj
246+ return obj
248247
249248 def _gotitem (self , key , ndim , subset = None ):
250249 """
@@ -333,7 +332,7 @@ def __repr__(self) -> str:
333332
334333 def __iter__ (self ):
335334 window = self ._get_window (win_type = None )
336- _ , obj = self ._create_blocks (self ._selected_obj )
335+ obj = self ._create_data (self ._selected_obj )
337336 index = self ._get_window_indexer (window = window )
338337
339338 start , end = index .get_window_bounds (
@@ -469,7 +468,7 @@ def _apply_series(self, homogeneous_func: Callable[..., ArrayLike]) -> "Series":
469468 """
470469 Series version of _apply_blockwise
471470 """
472- _ , obj = self ._create_blocks (self ._selected_obj )
471+ obj = self ._create_data (self ._selected_obj )
473472
474473 try :
475474 values = self ._prep_values (obj .values )
@@ -489,7 +488,7 @@ def _apply_blockwise(
489488 if self ._selected_obj .ndim == 1 :
490489 return self ._apply_series (homogeneous_func )
491490
492- _ , obj = self ._create_blocks (self ._selected_obj )
491+ obj = self ._create_data (self ._selected_obj )
493492 mgr = obj ._mgr
494493
495494 def hfunc (bvalues : ArrayLike ) -> ArrayLike :
@@ -1268,7 +1267,7 @@ def count(self):
12681267 # implementations shouldn't end up here
12691268 assert not isinstance (self .window , BaseIndexer )
12701269
1271- _ , obj = self ._create_blocks (self ._selected_obj )
1270+ obj = self ._create_data (self ._selected_obj )
12721271
12731272 def hfunc (values : np .ndarray ) -> np .ndarray :
12741273 result = notna (values )
@@ -2234,7 +2233,7 @@ def _apply(
22342233 def _constructor (self ):
22352234 return Rolling
22362235
2237- def _create_blocks (self , obj : FrameOrSeriesUnion ) :
2236+ def _create_data (self , obj : FrameOrSeries ) -> FrameOrSeries :
22382237 """
22392238 Split data into blocks & return conformed data.
22402239 """
@@ -2246,7 +2245,7 @@ def _create_blocks(self, obj: FrameOrSeriesUnion):
22462245 list (self ._groupby .grouper .indices .values ())
22472246 ).astype (np .int64 )
22482247 obj = obj .take (groupby_order )
2249- return super ()._create_blocks (obj )
2248+ return super ()._create_data (obj )
22502249
22512250 def _get_cython_func_type (self , func : str ) -> Callable :
22522251 """
0 commit comments