the normal way is by drying in a vacuum oven. however, as DMF may for hydrogen bonds with your materials, it will be very difficult to get ride of it. so I suggest to try different solvent such as DMSO. hope that would help.
I used to prepare polymeric and composite films using DMF as solvent, I put them in oven at 120 °C for 24 h then in vaccum oven at 80°C for another 24 h.
You can use different method, but it depend on specific your polymer. As mention above, if your polymer is insoluble in water, it is very easy and you can dip the casted film in ice cold water. The solvent (DMF) goes in water so after dipping or you can place the film between filter paper and dry it in vacuum oven.