Skip to content

Commit 949ef4f

Browse files
committed
Change sum() to ndarray.sum()
1 parent 11c26e2 commit 949ef4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def value_counts(
724724
result = result.sort_values(ascending=ascending)
725725

726726
if normalize:
727-
result = result / float(sum(counts))
727+
result = result / float(counts.to_numpy().sum())
728728

729729
return result
730730

0 commit comments

Comments
 (0)