Count(missing=CountedMissing.EXCLUDED)
Source¶
Bases: Statistic
Number of values, without the missing ones by default.
Use count_missing to count only the missing values, and the row_count of an Aggregation to count the
rows of each group.
Added in version 0.1.0
Parameters:
-
missing(CountedMissing, default:CountedMissing.EXCLUDED)CountedMissing.EXCLUDEDby default to count only the present values,CountedMissing.INCLUDEDto count every value.
Raises:
-
InvalidTypeErrorWhen a setting is not of the type its annotation names.
Examples:
import numdaplot as ndp
answers = ndp.Array.from_list([4.0, None, 2.0])
answers.compute(ndp.Count()).to_value()
# 2
answers.compute(ndp.Count(missing=ndp.CountedMissing.INCLUDED)).to_value()
# 3