How did Egyptian culture/religion transform from pyramids and polytheism to Islam?
polytheism to Islam?
There's quite a large intermediate step there which would be from Polytheism to Christianity, which other users would likely be able to comment on more. I recently wrote a post on the conversion of Palestine to Islam which would largely apply equally to Egypt as well.
The biggest difference would be that as a proportion of the population the conversion rates in Egypt were a bit lower. 10% of Egypt remains Coptic Christian (though that's an "official" figure. No one actually knows how many Copts remain in Egypt.) But from what from what I've read on the subject we hit the modern proportion of 90% Muslim, 10% Christian by around the Mameluke period in the late Middle Ages.
Also of particular note for Egypt is that although the Fatimid Shia dynasty ruled Egypt for a couple hundred years, they don't appear to have successfully made inroads to converting the dominant Sunni population, except in a few isolated communities of upper Egypt I believe.