> result_dataFrame['yearOverYearMax'] = year_dataFrame.groupby('partId')['unitCost'].max()
> And big productivity booster on code entry.
Try reducing the DRY violations and you might have to write less. Almost the entire right side of the first two lines is repeated and third line is only that long because it has to recover the results from the map instead of using local variables.
While tools like boxing gloves reduce the damage your face takes it is usually better to just try and stop hitting yourself first.