Counting non zero values in each column of a dataframe in python,df.astype(bool).sum(axis=1)