count how many times a value appears in a dataframe column python code example Example: number of times a value occurs in dataframne df['a'].value_counts()