How to count zero in each row pandas code example Example: df count zeros df.astype(bool).sum(axis=0)