Skip to content

Commit ea49e77

Browse files
author
Giacomo Ferroni
committed
Fix for GH12541
1 parent 0fe491d commit ea49e77

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

pandas/core/window.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -762,17 +762,7 @@ def count(self):
762762

763763
results = []
764764
for b in blocks:
765-
766-
if needs_i8_conversion(b.values):
767-
result = b.notnull().astype(int)
768-
else:
769-
try:
770-
result = np.isfinite(b).astype(float)
771-
except TypeError:
772-
result = np.isfinite(b.astype(float)).astype(float)
773-
774-
result[pd.isnull(result)] = 0
775-
765+
result = b.notnull().astype(int)
776766
result = self._constructor(result, window=window, min_periods=0,
777767
center=self.center).sum()
778768
results.append(result)

0 commit comments

Comments
 (0)