Advertisement
EXTREMEXPLOIT

Souti Estoy Desesperado

May 24th, 2020
1,347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. index = ['Revenue', 'CNT_EMPLOYEE', 'Mobile_potential', 'CNT_CB_DENSITY', 'CNT_CB_MOB_DENSITY', 'CNT_CB_FN_DENSITY']
  2.  
  3. IQR_NC = noncustomer_dt[index].quantile(0.75) - noncustomer_dt[index].quantile(0.25)
  4. IQR_C = customer_dt[index].quantile(0.75) - customer_dt[index].quantile(0.25)
  5.  
  6. for var in index:
  7.     customer_dt = customer_dt.drop(customer_dt[customer_dt[var] > (5 * IQR_C[var])].index)
  8.     noncustomer_dt = noncustomer_dt.drop(noncustomer_dt[noncustomer_dt[var] > (5 * IQR_NC[var])].index)
  9.    
  10. market_boxplot(noncustomer_dt, customer_dt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement