Welcome to the forum Neomeris.
The entire Poeciliid group of species, which includes Poecilia reticulata, guppies, is sexually dimorphic. They can no more change sex than people can. Their sex is determined by their genetics. What often does happen is that immature specimens are seen by us as females because the male characteristics are not evident in immature males. When the males begin to mature, we see what we interpret as a sex change. This is an especially common thing in swordtails where the male sex differences can sometimes not show for well over a year. At that point a swordtail will be quite large and will be a convincing female in appearance. When it "becomes" a male, everyone but the fish is impressed. The male knew it was a male all along.
I had this happen to me with a group of 6 Xiphophorus helleri, wild green swordtails, that I picked up at a club auction. It was almost 2 years before the last of those males in the all male group showed his gender by growing a sword tail. When I sold the bunch off in another club auction, all of them were obvious males and were stupendous specimens compared to the ones that show their gender early on.