count N/A values in pandas columns code example Example: pandas count values by column df = pd.DataFrame({'a':list('abssbab')}) df.groupby('a').count()