Vectorised transformations, groupby patterns, and the chained assignment that appears to work until it does not.