pandas || 3 lines, merge and groupby
\nimport pandas as pd\n\ndef department_highest_salary(employee  : pd.DataFrame, \n                              department: pd.DataFrame) -> pd.DataFrame:\n\n 
```\nimport pandas as pd\n\ndef department_highest_salary(employee  : pd.DataFrame, \n                              department: pd.DataFrame) -> pd.DataFrame:\n\n    df = employee.merge(department, how=\'left\', \n                        left_on=\'departmentId\', right_on=\'id\')\n\n    grp = df.groupby(\'name_y\')[\'salary\']                    \n\n    return df[df.salary == grp.transform(max)].iloc[:,[5,1,2]\n             ].rename(columns = {\'name_x\': \'Employee\',\n                                 \'salary\': \'Salary\',\n                                 \'name_y\': \'Department\'}) \n```
['Pandas']