I know this question is quite trivial, but this is my first day of using pandas, so please at least post a link to the document which I should read.
Basically, I don't know how to count the number of items of each column. Suppose I have a data frame like this:
df = pandas.DataFrame({ "Grade": [1, 2, 1, 1, 2, 1, 2, 2, 1], "Major": ["Science", "Art", "Engineering", "Science", "Science", "Science", "Science", "Engineering", "Engineering"]}) I expect the following result:
Grade Major Number 1 Science 3 1 Engineering 2 1 Art 0 2 Science 2 2 Engineering 1 2 Art 1