I have a dataframe called Votes
and I am trying to figure out how many missing values are in the data frame represented as '?'
. The Data Frame has header=none
so the column titles are listed as 0
, 1
, 2
etc. I used the following code:
Empty = Votes.loc[:,:] == '?'
to find the missing data, and then sum up the column tallies to create a boolean to find missing data. I would like to sum the column tallies that indicate the missing value to see how many missing values are in the dataframe. I used the code:
sum(Empty.sum())
to get the total but was unable to do it by column. How could I find the total by summing the column tallies?