Does anyone knwos how to count rows groupby column. Example i have column col1 of my dataframe df as shown in the example below.
I want to print (LA:2, NY: 3, PARIS:1, JAPAN:1)
d = {'col1': ['LA', 'LA', 'NY', 'PARIS', 'JAPAN', 'NY', 'NY']}
df = pd.DataFrame(data=d)
PLease help me,
Thank you,