Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit e5ea29c

Browse files
Rubtsowashssf
authored andcommitted
fix Series.count (#336)
* fix Series.count * fix Series.count
1 parent 8216475 commit e5ea29c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sdc/datatypes/hpat_pandas_series_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2955,7 +2955,8 @@ def hpat_pandas_series_count(self, level=None):
29552955
if isinstance(self.data, StringArrayType):
29562956
def hpat_pandas_series_count_str_impl(self, level=None):
29572957

2958-
return len(self._data)
2958+
nan_mask = self.isna()
2959+
return numpy.sum(nan_mask._data == 0)
29592960

29602961
return hpat_pandas_series_count_str_impl
29612962

0 commit comments

Comments
 (0)