use dxflib to copy file and delete certain entities

Is there a straight forward way to copy an input dxf file to an output file while editing just certain entities?

dxflib only parses / writes DXF. It does not provide any means to transform, edit, delete entities, etc.

It could probably be done with ezdxf. About - ezdxf