text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

sbm = pd.read_csv('/kaggle/input/college-salaries/degrees-that-pay-back.csv').set_index('Undergraduate Major')
sbc = pd.read_csv('/kaggle/input/college-salaries/salaries-by-college-type.csv').set_index('School Name')
sbr = pd.read_csv('/kaggle/input/college-salaries/salaries-by-region.csv').set_index('School Name')

dataFrameList = [sbm, sbc, sbr]
for df in dataFrameList:
    for col in df.columns:
        i = 0
        while i < df.shape[0]:
            if isinstance(df[col].iloc[i], str) and df[col].iloc[i][0] == '$':
                df[col].iloc[i] = df[col].iloc[i].replace(',', '')
                df[col].iloc[i] = df[col].iloc[i].replace('$', '')
                df[col].iloc[i] = float(df[col].iloc[i])
            i = i + 1