I have a DataFrame
Date Open Close
20190101 23.00 0
20190102 0 0
20190103 19 18
20190104 21 19
I first turn all the NaN to zeros, then I am going to change all the zeros to the numbers based on the non zeros using interpolate(limit_direction='both')
. Prior to doing this I would like to count how many zeros there are in the whole dataframe to check how much data corruption there is.
I cannot seem to find it. I believe its along the lines of turning them to boolean and counting that way but have been unsuccessful so far.
EDIT: (df == 0).sum().sum()
worked perfect thanks