python count number of zeros in a column

(myDataFrame[column_name] == 0).sum()

Here is what the above code is Doing:
1. We’re creating a function that takes in a dataframe and a column name.
2. We’re creating a new column in the dataframe called ‘column_name_count’ and setting it equal to the number of non-zero values in the column.
3. We’re returning the dataframe.