How to remove nails with heads cut off?
Once we bought an old pallet factory, so I really got to "see how the sausage is made".  

Pallets are made in extremely, extremely high production because the typical corporate customer orders thousands and pays about $6 each for them.  There are also an infinite number of pallet sizes and styles, though most fit a 40x48 footprint.  These two requirements force the industry into extreme levels of automation with CNC machines and very high production gang nailers.  

As such, the nails are not really recognizable as nails in the normal way.  They are a very heavy industrial version of power nailer nails, made in very long chains with wires spot-welded to the nails.  They are made to not break and not jam, because that stops production.  When driven the bits of wire just get driven too.  They have a spiral shank and have virtually no head, being one-shotted in by sheer pneumatic or electrohydraulic force.  (The air system was surprisingly lightweight, so I suspect the latter; the machines took copious amounts of 480V.) 

Being woodworkers, we evaluated the wood since there was a fair bit of it laying around never nailed.  The wood used in pallets is positively awful.  It is the junkiest of junk hardwood.  Cleaning it up in a jointer and planer was not worth the blade wear and did not produce anything we would call good lumber.  

As such I see no point in cleaning up the wood. Just use it rough, and then you don't need to remove the nails.  

Also in the future when you want to salvage pallets, pry the deck board about 1/4" off the stringer then tap the deck board back down.  The nail should pop up with head exposed.