🐼pandas easy solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\nSort table by salary in descending order. Drop duplicated salaries.\n\n.iloc[N - 1:N]
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\nSort table by salary in descending order. Drop duplicated salaries.\n\n`.iloc[N - 1:N]` returns Nth salary if `len(table) < N`, else `null`\n\n# Code\n```\nimport pandas as pd\n\ndef nth_highest_salary(employee: pd.DataFrame, N: int) -> pd.DataFrame:\n\n    employee = employee.sort_values(\'salary\', ascending=False).drop_duplicates(subset=[\'salary\'])\n    employee = employee.iloc[N - 1:N]\n    return employee[[\'salary\']]\n    \n    \n```
['Pandas']