I know Drows as a race do not need to sleep but have to do a 4 hour trance to stay rested but is that enough for a drow wizard to memorize their spells or do they still need to sleep for 8 hours?
Elves in general do not sleep, but rather “trance.” Trancing is a similar, low-activity state, but the elf maintains awareness of his surroundings, and only requires 4 hours to be fully rested rather than 8.
Arcane spellcasters, however, require 8 hours of relative inactivity in order to prepare their spells; elves do not get around this. So, for the remaining 4 hours, the drow wizard still cannot really do anything, though he is awake/not-trancing. He can walk around camp a bit, but hiking through the woods, a forced march, or so on is right out. He might be able to read a light novel, but rigorous study or investigation is too much, and anything to do with spells is right out. He’s awake and aware of his surroundings, but even guard duty might be too much, since that implies a level of vigilance that’s fairly straining.