The Jataka, Volume I, tr. by Robert Chalmers, , at sacred-texts.com
"Think’st thou."--This story was told by the Master while at Jetavana, about a lay-brother. Tradition says that there dwelt at Sāvatthi a lay-brother, who was stablished in the Three Gems and the Five Commandments, a devout lover of the Buddha, the Doctrine and the Brotherhood. But his wife was a sinful and wicked woman. On days when she did wrong, she was as meek as a slave-girl bought for a hundred pieces; whilst on days when she did not do
wrong, she played my lady, passionate and tyrannical. The husband could not make her out. She worried him so much that he did not go to wait on the Buddha.
One day he went with perfumes and flowers, and had taken his seat after due salutation, when the Master said to him:--"Pray how comes it, lay-brother, that seven or eight days have gone by without your coming to wait upon the Buddha?" "My wife, sir, is one day like a slave-girl bought for a hundred pieces, while another day finds her like a passionate and tyrannical mistress. I cannot make her out; and it is because she has worried me so that I have not been to wait upon the Buddha."
Now, when he heard these words, the Master said, "Why, lay-brother, you have already been told by the wise and good of bygone days that it is hard to understand the nature of women." And he went on to add "but his previous existences have come to be confused in his mind, so that he cannot remember." And so saying, he told this story of the past.
Once on a time when Brahmadatta was reigning in Benares, the Bodhisatta came to be a teacher of world-wide fame, with five hundred young brahmins studying under him.  One of these pupils was a young brahmin from a foreign land, who fell in love with a woman and made her his wife. Though he continued to live on in Benares, be failed two or three times in his attendance on the master. For, you should know, his wife was a sinful and wicked woman, who was as meek as a slave on days when she had done wrong, but on days when she had not done wrong, played my lady, passionate and tyrannical. Her husband could not make her out at all; and so worried and harassed by her was he that he absented himself from waiting on the Master. Now, some seven or eight days later he renewed his attendances, and was asked by the Bodhisatta why he had not been seen of late.
"Master, my wife is the cause," said he. And he told the Bodhisatta how she was meek one day like a slave-girl, and tyrannical the next; how he could not make her out at all, and how he had been so worried and harassed by her shifting moods that he had stayed away.
"Precisely so, young brahmin," said the Bodhisatta; "on days when they have done wrong, women humble themselves before their husbands and become as meek and submissive as a slave-girl; but on days when they have not done wrong, then they become stiff-necked and insubordinate to their lords. After this manner are women sinful and wicked; and their nature is hard to know. No heed should be paid either to their likes or to their dislikes." And so saying, the Bodhisatta repeated for the edification of his pupil this Stanza:--
 Such was the Bodhisatta's instruction to his pupil, who thenceforward paid no heed to his wife's caprices. And she, hearing that her misconduct had come to the ears of the Bodhisatta, ceased from that time forward from her naughtiness.
So too this lay-brother's wife said to herself, "The Perfect Buddha himself knows, they tell me, of my misconduct," and thenceforth she sinned no more.
His lesson ended, the Master preached the Truths, at the close whereof the lay-brother won the Fruit of the First Path. Then the Master shewed the connexion and identified the Birth by saying--"This husband and wife were also the husband and wife of those days, and I myself the teacher."