pandas find median of non zero values in a column

Solutions on MaxInterview for pandas find median of non zero values in a column by the best coders in the world

showing results for - "pandas find median of non zero values in a column"
Kaitlynn
11 Apr 2019
1# find the median of non zero values from the column 'minSalaryAnnual
2medianMinPA = (df['minSalaryAnnual'].loc[df['minSalaryAnnual'] != 0]).median()