Try something like this in a PythonCaller:
# Generate a list containing a tuple for each attribute definition
names = feature.getAttribute('attribute{}.name')
fme_data_types = feature.getAttribute('attribute{}.fme_data_type')
native_data_types = feature.getAttribute('attribute{}.native_data_type')
input_schema = zip(names, fme_data_types, native_data_types)
# Filter out named attributes
attributes_to_delete = ('OBJECTID', 'MyAttribute1', 'MyAttribute2')
output_schema = [attr_def
for attr_def
in input_schema
if attr_def[0] not in attributes_to_delete]
# Need to explicitely remove all existing list items first, since
# simply setting new values does not automatically remove
# existing items outside of the range of new items.
feature.removeAttribute('attribute{}.name')
feature.removeAttribute('attribute{}.fme_data_type')
feature.removeAttribute('attribute{}.native_data_type')
# Set the schema feature attribute definitions
feature.setAttribute('attribute{}.name',
[attr_def[0] for attr_def in output_schema])
feature.setAttribute('attribute{}.fme_data_type',
[attr_def[1] for attr_def in output_schema])
feature.setAttribute('attribute{}.native_data_type',
[attr_def[2] for attr_def in output_schema])
Make sure to modify the contents of attributes_to_delete as needed.