We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fe491d commit ea49e77Copy full SHA for ea49e77
pandas/core/window.py
@@ -762,17 +762,7 @@ def count(self):
762
763
results = []
764
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
+ result = b.notnull().astype(int)
776
result = self._constructor(result, window=window, min_periods=0,
777
center=self.center).sum()
778
results.append(result)
0 commit comments