I have a dataset where all values in column B
are the same. It looks like this:
A B
0 Marble Hill Pizza Place
1 Chinatown Pizza Place
2 Washington Pizza Place
3 Washington Pizza Place
4 Inwood Pizza Place
5 Inwood Pizza Place
I wish to convert column A
values to rows. Then column B
should count the number occurrences of each value from A
.
I want it to look like this:
B
Marble Hill 1
Chinatown 1
Washington 2
Inwood 2