By CS do you mean being a practitioner or being a researcher?
As for practitioner, I think you could jump right into a "data science" kind of role. Python is particularly good for that. Maybe also something with embedded systems.
I am not so sure how to switch fields for research. I was discouraged from doing that back in the day.
For background, I got a PhD in theoretical physics at Cornell in 1998. I did a postdoc for 1 year in Dresden, Germany. In school I did as much as I could in Java. I quit physics, went home and bought a farm close to Ithaca (my wife grew up 40 miles away.) She teaches kids to ride horses and since then I have done programming at Cornell, companies in the Ithaca area, remote, as a consultant, etc. I became the black sheep of my research group and I have gone through phases of intense soul-searching from time to time, but I am still here.