def replace(frame, old, new, cols=None):
    """
    Replace all instances of 'old' with 'new' in the specified columns.

    Input: 
        * frame
        * old = value to replace
        * new = value to replace with
        * cols = LIST of columns to replace within. 
                 Defaults to all.
    """
    columns = cols if cols is not None else frame.columns
    for row in range(frame.shape[0]):
        for col in columns:
            if frame.iloc[row][col] == old:
                frame.loc[row, col] = new
    return frame