✅ Pandas Beginner Friendly Solution 🔥
\uD83D\uDD3C IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D\n\nimport pandas as pd\n\ndef department_highest_salary(employee: pd.DataFrame, department
**\uD83D\uDD3C IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D**\n```\nimport pandas as pd\n\ndef department_highest_salary(employee: pd.DataFrame, department: pd.DataFrame) -> pd.DataFrame:\n    \n    merged_df = employee.merge(department, left_on = \'departmentId\', right_on = \'id\')\n    \n    merged_df = merged_df.rename(columns = {\'name_x\': \'Employee\', \'name_y\': \'Department\', \'salary\': \'Salary\'})[[\'Department\', \'Employee\', \'Salary\']]\n    \n    return merged_df[merged_df[\'Salary\'] == merged_df.groupby(\'Department\')[\'Salary\'].transform(max)]\n```\n**Thank you for reading! \uD83D\uDE04 Comment if you have any questions or feedback.**
['Python']