File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -744,21 +744,17 @@ def group_sum(
744
744
for j in range (K):
745
745
val = values[i, j]
746
746
747
- if not skipna and (
748
- (uses_mask and result_mask[lab, j]) or
749
- (is_datetimelike and sumx[lab, j] == NPY_NAT) or
750
- _treat_as_na(sumx[lab, j], False )
751
- ):
752
- # If sum is already NA, don't add to it. This is important for
753
- # datetimelikebecause adding a value to NPY_NAT may not result
754
- # in a NPY_NAT
755
- continue
756
-
757
747
if uses_mask:
758
748
isna_entry = mask[i, j]
759
749
else :
760
750
isna_entry = _treat_as_na(val, is_datetimelike)
761
751
752
+ if not skipna and isna_entry:
753
+ # If sum is already NA, don't add to it. This is important for
754
+ # datetimelikebecause adding a value to NPY_NAT may not result
755
+ # in a NPY_NAT
756
+ continue
757
+
762
758
if not isna_entry:
763
759
nobs[lab, j] += 1
764
760
You can’t perform that action at this time.
0 commit comments