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