def remove_space(data):
    """Removes the intermediate redundant space in SMILES strings.
    The input must contain two columns titled 'Reactants' and 'Products'

    """
    for i in range(data.shape[0]):
        data['Reactants'][i] = data['Reactants'][i].replace(' ', '')
        data['Products'][i] = data['Products'][i].replace(' ', '')
    return data