I am exploring a large dataframe with an object (string) column (air) of varying lengths such as this small example.
aic
12345678
87654321
123456789
1234
I want to obtain a summary of the count of each string length such as for the example:
length count
4 1
8 2
9 1
I tried with
df["aic"].str.len().nunique()
which returns 3 meaning there are two different lengths but I don't know which.
Thank you