I have df, like this
States Counts
AK one
AK two
AK one
LO one
LO three
LO three
trying to get most occured counts for each status
my code:
df.groupby('States')['Counts'].value_counts().first(), gives
TypeError: first() missing 1 required positional argument: 'offset'
expected output:
States Counts
AK one
LO three