Python Pandas: How do I get the length of arrays that are values of a column?

Hi all,

I found a problem where the values of a column are arrays of different length. What is the best, efficient way to get the values of the length of each array in that column?

EDIT (following PortableStick advice):

Cannot reproduce the code, but the structure of the pandas data frame seems to be:

arr_of_arrs = [ [ 1,2,3 ] , [ 1,2,3,4 ] , [ 1,2,3,4,5 ] ]
pf = pd.DataFrame(arr_of_arrs, columns=[ 'arrofarrs' ])

Thanks in advance

Can you post the code you’re working on so we have some context?

df["desired column"].apply(lambda x: len(x))