We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3da753b commit beb50efCopy full SHA for beb50ef
solution/0100-0199/0177.Nth Highest Salary/README_EN.md
@@ -93,6 +93,8 @@ import pandas as pd
93
94
95
def nth_highest_salary(employee: pd.DataFrame, N: int) -> pd.DataFrame:
96
+ if N < 1:
97
+ return pd.DataFrame({"getNthHighestSalary(" + str(N) + ")": [None]})
98
unique_salaries = employee.salary.unique()
99
if len(unique_salaries) < N:
100
return pd.DataFrame([np.NaN], columns=[f"getNthHighestSalary({N})"])
0 commit comments