Eda, Exploratory Data Analysis, Pandas, Python.
np.issubdtype(df[column].dtype, np.number): if len(non_distinct_val_list) > 0: average = sum(non_distinct_val_list)/len_non_d_list non_zero_val_list = [v for v in non_distinct_val_list if v > 0] average_non_zero = sum(non_zero_val_list)/len_non_d_list else: average = None average_non_zero = None