File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -2832,18 +2832,17 @@ def blk_func(values: ArrayLike) -> ArrayLike:
2832
2832
else :
2833
2833
# We broadcast algorithms.take_nd analogous to
2834
2834
# np.take_along_axis
2835
-
2836
- # Note: we only get here with backfill/pad,
2837
- # so if we have a dtype that cannot hold NAs,
2838
- # then there will be no -1s in indexer, so we can use
2839
- # the original dtype (no need to ensure_dtype_can_hold_na)
2840
2835
if isinstance (values , np .ndarray ):
2841
2836
dtype = values .dtype
2842
2837
if self .grouper .has_dropped_na :
2843
2838
# dropped null groups give rise to nan in the result
2844
2839
dtype = ensure_dtype_can_hold_na (values .dtype )
2845
2840
out = np .empty (values .shape , dtype = dtype )
2846
2841
else :
2842
+ # Note: we only get here with backfill/pad,
2843
+ # so if we have a dtype that cannot hold NAs,
2844
+ # then there will be no -1s in indexer, so we can use
2845
+ # the original dtype (no need to ensure_dtype_can_hold_na)
2847
2846
out = type (values )._empty (values .shape , dtype = values .dtype )
2848
2847
2849
2848
for i , value_element in enumerate (values ):
Original file line number Diff line number Diff line change 4
4
5
5
import inspect
6
6
7
+ import pytest
8
+
7
9
from pandas import (
8
10
DataFrame ,
9
11
Series ,
17
19
def test_frame_consistency (groupby_func ):
18
20
# GH#48028
19
21
if groupby_func in ("first" , "last" ):
20
- # first and last are entirely different between frame and groupby
21
- return
22
+ msg = " first and last are entirely different between frame and groupby"
23
+ pytest . skip ( reason = msg )
22
24
23
25
if groupby_func in ("cumcount" , "ngroup" ):
24
26
assert not hasattr (DataFrame , groupby_func )
You can’t perform that action at this time.
0 commit comments