How to find frequency of unique values in dataframe?

Hello everyone, I’m currently working on a project that involves analyzing a large dataset in Python using Pandas. I’m trying to find the frequency of unique values in a dataframe, but I’m struggling to figure out an efficient way to do it. So, I would like to ask for your help to find alternative ways to solve this problem. Specifically, I want to count how many times each unique value appears in a particular column of the dataframe. I have tried using the ‘value_counts()’ method in Pandas, but I want to learn that in how many ways it can be done. Any suggestions or solutions would be greatly appreciated.

Here is the code that I wrote: