print(df.columns.str.split('_').str[0].unique())
['abc']
for x in df.columns.str[0].unique():
    df[x + '_ratio'] = df[x + '_us'] / df[x + '_ww']
Working in Pandas with variable names with a common suffix