<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 tt = [cname.split()[0].split('EUSWI')[1] for cname in df_raw.columns if 'CMPN' in cname  ]
len(tt)
df_raw.columns = [c.split()[0].split('EUSWI')[1] + 'y' for c in df_raw.columns]
Step1:  df_raw['2yf1y'] = df_raw[['1y','3y']].apply(lambda x
<ASSISTANT_TASK:>
Python Code:
df_raw.tail()
def getForward(v,t1=1,t2=2):
    return (np.power(np.power(1+v[1]/100,t2)/np.power(1+v[0]/100,t1),1/(t2-t1))-1)*100
ind1 = 0
ind2 = 1
v2 = df_raw.iloc[-1,ind2]
v1 = df_raw.iloc[-1,ind1]
t1 = int(df_raw.columns[ind1].strip('y'))
t2 = int(df_raw.columns[ind2].strip('y'))
print('v1 is {}, v2 is {}'.format(v1,v2))
v = [v1,v2]
f = getForward(v,t1,t2)
f
df_raw['1yf1y'] = pd.Series('',index = df_raw.index)
df_raw.tail()
df_raw['1yf1y'] = df_raw[['1y','2y']].apply(getForward,axis=1)
df_raw['1yf1y'] = df_raw[['1y','2y']].apply(lambda x: getForward(x,t1=1,t2=2),axis=1)
df_raw.tail()
def AddForward(df,t1=1,t2=2):
    
    #add an empty column
    df[str(t2-t1)+'yf'+str(t1)+'y'] = pd.Series('',index = df.index)
    df[str(t2-t1)+'yf'+str(t1)+'y'] = df[[str(t1)+'y',str(t2)+'y']].apply(lambda x: getForward(x,t1,t2),axis=1)
    
AddForward(df_raw,t1=3,t2=4)
df_raw.tail()
t1,t2=1,3
#df[str(t2-t1)+'yf'+str(t1)+'y'] = pd.Series('',index = df.index)
df.tail()
Explanation: tt = [cname.split()[0].split('EUSWI')[1] for cname in df_raw.columns if 'CMPN' in cname  ]
len(tt)
df_raw.columns = [c.split()[0].split('EUSWI')[1] + 'y' for c in df_raw.columns]
End of explanation
df_raw[['1y','3y']]
df[str(t2-t1)+'yf'+str(t1)+'y'] = df[[str(t1)+'y',str(t2)+'y']].apply(lambda x: getForward(x,t1,t2),axis=1)
Explanation: df_raw['2yf1y'] = df_raw[['1y','3y']].apply(lambda x: getForward(x,t1=1,t2=3),axis=1)
End of explanation
<END_TASK>