File tree 2 files changed +1
-17
lines changed
2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ def setup(self):
564
564
565
565
def time_frame_get_dtype_counts (self ):
566
566
with warnings .catch_warnings (record = True ):
567
- self .df ._data . get_dtype_counts ()
567
+ self .df .dtypes . value_counts ()
568
568
569
569
def time_info (self ):
570
570
self .df .info ()
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ class BlockManager(PandasObject):
74
74
set_axis(axis, new_labels)
75
75
copy(deep=True)
76
76
77
- get_dtype_counts
78
77
get_dtypes
79
78
80
79
apply(func, axes, block_filter_fn)
@@ -256,18 +255,6 @@ def _rebuild_blknos_and_blklocs(self) -> None:
256
255
def items (self ) -> Index :
257
256
return self .axes [0 ]
258
257
259
- def _get_counts (self , f ):
260
- """ return a dict of the counts of the function in BlockManager """
261
- self ._consolidate_inplace ()
262
- counts = dict ()
263
- for b in self .blocks :
264
- v = f (b )
265
- counts [v ] = counts .get (v , 0 ) + b .shape [0 ]
266
- return counts
267
-
268
- def get_dtype_counts (self ):
269
- return self ._get_counts (lambda b : b .dtype .name )
270
-
271
258
def get_dtypes (self ):
272
259
dtypes = np .array ([blk .dtype for blk in self .blocks ])
273
260
return algos .take_1d (dtypes , self .blknos , allow_fill = False )
@@ -1530,9 +1517,6 @@ def index(self) -> Index:
1530
1517
def dtype (self ) -> DtypeObj :
1531
1518
return self ._block .dtype
1532
1519
1533
- def get_dtype_counts (self ):
1534
- return {self .dtype .name : 1 }
1535
-
1536
1520
def get_dtypes (self ) -> np .ndarray :
1537
1521
return np .array ([self ._block .dtype ])
1538
1522
You can’t perform that action at this time.
0 commit comments