A prior layoff - I had time on my hands and I wanted to learn something useful, so I started learning Python for data science, specifically for doing time-series forecasting and logistic regression. Took a few months to get reasonably competent, it was quite the step from Java or C/C++, but once I got to a decent level of proficiency I've not looked back. It's also paid off handsomely career-wise too.