For the dataframe,
df = pd.DataFrame(data=[[34, 'null', 'mark'], [22, 'null', 'mark'], [34, 'null', 'mark']], columns=['id', 'temp', 'name'], index=[1, 2, 3])
the following code
for c in df.columns:
print "---- %s ---" % c
print df[c].value_counts()
will produce the following result:
---- id ---
34 2
22 1
dtype: int64
---- temp ---
null 3
dtype: int64
---- name ---
mark 3
dtype: int64
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…