how would I use a single-line command to find the cardinality of all the values within a column within a dataframe? Using only pandas. I have a column of data made up of different strings and I want to count the number of occurrences of each value within that column. Example
df = pd.DataFrame({'Animal':['cat', 'dog', 'bird', 'dog', 'bird', 'bird']})
How would get the cardinality of each string?
cat : 1 bird : 3 dog: 2
so that I could also us it to make a bar plot using pandas