count number of zeros in column pandas code example Example: df count zeros df.astype(bool).sum(axis=0)