From a pandas column, I would like the count of how many times each unique column value appears in that column.
Currently I am using this
count_dictionary = df.column_name.value_counts()
But for tens of millions of rows, it is taking many hours to process.
Is there a more computably efficient way to calculate this dictionary?