I have the DataFrame
df = pd.DataFrame({'colA':['?',2,3,4,'?'],'colB':[1,2,'?',3,4],'colC':['?',2,3,4,5]
})
I would like to get the count the the number of '?'
in each column and return the following output -
colA - 2
colB - 1
colC - 1
Is there a way to return this output at once. Right now the only way I know how to do it is write a for loop for each column.