That’s very interesting. I had some code like this that was running fairly quickly, I changed some very minor things about it and it slowed down tremendously and that is when I investigated the type inference and discovered this. I suppose it was not being inferred before either.
Do you have any suggestions for a better way to loop over the groups of a GroupedDataFrame?