caprice
Definitions
A sudden, impulsive, and seemingly unmotivated change of mind or behavior.
A tendency to change one's mood or behavior unpredictably; a whim.
A lively or whimsical musical composition.
Examples
The decision to move to the countryside was a sudden caprice that surprised all of his friends.
She found it difficult to work for a boss whose management style was governed by mere caprice.
The weather in the mountains is known for its caprice, changing from sunshine to snow in a matter of minutes.