0

I have a list (that I've also made into a pandas data frame) of entries. Some of the entries are the same. For example: names = ['John', 'Joe', 'Teddy', 'Joe', 'Jack', 'Joe', 'John'] I want to make a data frame that displays each entry and the corresponding count, such that there would be one column with ['John', 'Joe', 'Teddy', 'Jack'] and another with the corresponding frequencies, [2, 3, 1, 1].

How would I go about doing this?

0 Answers0