data analysis EDA issues, indent or type
Try something like this (the function also needs to know what cols is - perhaps pass that in as another parameter?):

def read_auto_data(auto):
    for column in cols:
        auto[column] = pd.to_numeric(auto[column])
    return auto

auto = read_auto_data()