Untitled

mail@pastecode.io avatar
unknown
plain_text
13 days ago
724 B
1
Indexable
Never
[6/6 4:01 PM] Ganesh, Karthik (HM Health Solutions Inc)
q1 = pd.read_excel(r'O MM V_Q1 Extract.xlsx', sheet_name='Q1')

q2 = pd.read_excel(r'O MM V_Q2 Extract.xlsx', )

q3 = pd.read_excel(r'O MM V_Q3 Extract.xlsx', )
 
q1['key'] = q1['CPC']+q1['CPBR_STATEMENT']

q2['key'] = q2['CPC']+q2['CPBR_STATEMENT']

q2        = q2[['key', 'PRICING_DEF']]
 
q1_q2     = pd.merge(left=q1, right=q2, on='key',how='left')

q3_part1  = q3[q3['CPBR_STMT_TYPE']=='FIXED PARAMETER'].reset_index(drop=True)

q3_part2  = q3[q3['CPBR_STMT_TYPE']=='VARIABLE PARAMETER'].reset_index(drop=True)
 
final = pd.merge(left=q1_q2, right=q3_part1, on='PRICING_DEF', how='left')

final = pd.merge(left=final, right=q3_part2, on='PRICING_DEF', how='left')
Leave a Comment