pandas number of values in column code example
Example 1: number of column in dataset pandas
len(df.columns)
Example 2: pandas count values by column
df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()
len(df.columns)
df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()