It doesn’t look like there’s an aggday that does exactly this. It seems like what you want is something like “binary_sum”:
lambda x: sum(1 for i in x if i)
It doesn’t look like there’s an aggday that does exactly this. It seems like what you want is something like “binary_sum”:
lambda x: sum(1 for i in x if i)