ignore zeroes in mean calculation pandas code example
Example: pandas find median of non zero values in a column
# find the median of non zero values from the column 'minSalaryAnnual
medianMinPA = (df['minSalaryAnnual'].loc[df['minSalaryAnnual'] != 0]).median()