Because of the meaning of its name (pansy = thought), the pansy often represents free thinkers and open-minded people.
In Hamlet, Ophelia distributes pansy flowers with the remark, "There's pansies, that's for thoughts" (IV.5).
It may also just represent the memory of the loved one (remembrance).