if value in df column and count code example Example: number of times a value occurs in dataframne df['a'].value_counts()