count the number of zeros in a dataframe python code example Example: df count zeros df.astype(bool).sum(axis=0)