crime_incidents = train_df.Hour.value_counts().sort_index() code example
Example 1: value count in python
col-name.value_count()
Example 2: count_values in python
idx.value_counts()
col-name.value_count()
idx.value_counts()