Eda, Exploratory Data Analysis, Pandas, Python.
d['Events'].sum() # Calculate the non events in each group. d['Non-Events'] = d['N'] - d['Events'] # Calculate % of non events in each group. d['% of Non-Events'] = np.maximum(d['Non-Events'], 0.5) / d['Non-Events'].sum() # Calculate WOE by taking natural log of division of % of non-events and % of