SHARE
TWEET

Untitled

a guest Jun 12th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import psycopg2
  2. import numpy as np
  3. import pandas as pd
  4. from pandas import DataFrame
  5. import matplotlib.pyplot as plt
  6.  
  7. gp_conn = psycopg2.connect("dbname='gp_ns_ddl_prod' user='martin_ilavsky' password='' host='ddlpldurgpm11.us.dell.com' port='6420'")
  8. gp_cur = gp_conn.cursor()
  9.  
  10. sql = """
  11. SELECT s.identity_id_val,
  12.    s.journey_stage_score,
  13.    m.journey_stage_score
  14. FROM ws_mkt_dst.cjs_scores s
  15. LEFT JOIN (SELECT  identity_id_val,journey_stage_score FROM ws_mkt_dst.cjs_scores where run_uid = 99 and journey_stage_score != 0) m ON m.identity_id_val = s.identity_id_val
  16. WHERE s.run_uid = 34
  17.    and  s.journey_stage_score != 0
  18. """
  19.  
  20. gp_cur.execute(sql)
  21. df = pd.DataFrame(gp_cur.fetchall(),columns=['acct','parabolic','linear'],dtype='float')
  22. #df = pd.DataFrame(gp_cur.fetchall(),columns=['acct','m12','m11','m10','m9','m8','m7','m6','m5','m4','m3','m2','m1','m0'],dtype='float')
  23.  
  24.  
  25.  
  26. df.info()
  27.  
  28. plt.axvline(x=0.016181229773106796)
  29. plt.axvline(x=0.05933117583038835)
  30. df.boxplot(column=['parabolic','linear'],vert=False,figsize=("10","10"),showfliers=False)
  31. #df.boxplot(column=['m12','m11','m10','m9','m8','m7','m6','m5','m4','m3','m2','m1','m0'],vert=False,figsize=("10","10"),showfliers=False)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top