The word dandy is from the 1780s, with origins uncertain. According to the Online Etymology Dictionary, it originally appeared in this Scottish ballad:
"I've heard my granny crackIn that region, dandy is a diminutive of Andrew. Dandy might also be a shortened form of the 17th century jack-a-dandy, meaning conceited fellow.
O' sixty twa years back
When there were sic a stock of Dandies O"
Can a woman be a dandy? Sure! There's even a special word for it: cointrelle, even though dandyess and dandizette were used briefly. Cointrelle comes from the word coint, meaning a skillfully made thing.