Abstract DataFrame not iterable?

Hi there!

I have data like so

which I then combine according to the number of observations on each group like so


Finally I join the new feature with my main df:

The problem is when I wrap around function to the above commands I get the following error:

What is count? Maybe you meant nrow?


You’re right, sorry I’m an idiot!

Also if you’re doing combine(groupby(...)) and then join the result back to your original dataframe you were likely looking for transform! in the first place?


You learn something new every day!

Thank y’all!