I have a dataframe that has 3 columns -
I want to group the columns on the basis of Chopstick Length by doing something like this -
meansByCL = df_chopstick.groupby('Chopstick.Length')['Food.Pinching.Efficiency'].mean().reset_index()
but this throws an error -
AttributeError: Cannot access callable attribute 'groupby' of 'DataFrameGroupBy' objects, try using the 'apply' method
I'm not sure what this error means. Can anyone tell me what I'm doing wrong or how I can write this code differently?

df_chopstick, looks like it is already a groupby objectdf.groupby().groupby()df_chopstick = df_chopstick.groupby('Chopstick.Length')in a previous cell of Jupyter notebook.