The answer provided by @DSM is simple and straightforward, but I thought I'd add my own input to this question. If you look at the code for pandas.value_counts, you'll see that there is a lot going on.
If you need to calculate the frequency of many series, this could take a while. A faster implementation would be to use numpy.unique with return_counts = True
Here is an example:
import pandas as pd
import numpy as np
my_series = pd.Series([1,2,2,3,3,3])
print(my_series.value_counts())
3 3
2 2
1 1
dtype: int64
Notice here that the item returned is a pandas.Series
In comparison, numpy.unique
returns a tuple with two items, the unique values and the counts.
vals, counts = np.unique(my_series, return_counts=True)
print(vals, counts)
[1 2 3] [1 2 3]
You can then combine these into a dictionary:
results = dict(zip(vals, counts))
print(results)
{1: 1, 2: 2, 3: 3}
And then into a pandas.Series
print(pd.Series(results))
1 1
2 2
3 3
dtype: int64